TX Text Control .NET for WPF

Shape Class

Class|Introduced in 23.0
Namespace
TXTextControl.Drawing
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDrawing.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXDrawing.dll from the setup.
Implements
INotifyPropertyChanged

Description

The Drawing.Shape class represents a shape which can be displayed inside the TX Drawing Control. The Outline class implements the System.ComponentModel.INotifyPropertyChanged interface.

Syntax

public class Shape : INotifyPropertyChanged

Examples

The following example creates a Shape instance and configures its angle setting for a document workflow.

TXTextControl.Drawing.Shape shape = new();
shape.Angle = 10;

Members

Constructors

ConstructorDescription
ShapeInitializes a new instance of the Shape class.

Properties

PropertyDescription
AngleGets or sets the angle of the shape inside the TX Drawing Control. The default value is 0.
AutoSizeGets or sets a value indicating whether the shape is automatically resized with the TX Drawing Control. The default value is false.
BoundsGets or sets the bounding rectangle of the shape. The values are given in twips with an origin at the upper left corner of the TX Drawing Control. The default value correspond to the shape's default Location and Size values.
CanFitToCanvasGets a value which indicates whether the FitToCanvas method can be used or not.
FlipGets or sets whether and in what form the shape is flipped. The default value is Flip.None
IndexRepresents the index of the shape inside control's shape collection.
IsSelectedGets a value which indicates whether the shape is selected or not. The default value is false.
LocationGets or sets shape's current location. The values are given in twips with an origin at the upper left corner of the TX Drawing Control. The default values for Location.X and Location.Y correspond to one quarter the smallest control side.
MovableGets or sets a value which indicates whether the shape is movable or not. The default value is true.
ShapeFillGets the shape's fill properties.
ShapeOutlineGets the shape's outline properties.
SizableGets or sets a value which indicates whether the shape is sizable or not. The default value is true.
SizeGets or sets the shape's current size. The values are given in twips. The default values for Size.Width and Size.Height correspond to one half the smallest control side.
TypeGets or sets the shape's type. The default value is Drawing.ShapeType.Custom.

Methods

MethodDescription
FitToCanvasExpands the shape to the control's canvas size. The method has no effect if the CanFitToCanvas property returns false.

Events

EventDescription
PropertyChangedNot described in the reference. public event PropertyChangedEventHandler PropertyChanged;