New to Telerik Document ProcessingStart a free 30-day trial

Base type for drawable shapes that track size, transforms, outline, and fill used in documents.

Definition

Namespace:Telerik.Windows.Documents.Model.Drawing.Shapes

Assembly:Telerik.Windows.Documents.Core.dll

Syntax:

C#
public abstract class ShapeBase

Inheritance: objectShapeBase

Derived Classes: Image

Constructors

Initializes a new instance of the ShapeBase class by copying an Image instance.

C#
protected ShapeBase(ShapeBase other)
Parameters:otherShapeBase

The other image.

Methods

Initializes the size.

C#
protected virtual void InitializeSize()

Set the height and optionally adjust width to respect the current aspect ratio.

C#
public void SetHeight(bool respectLockAspectRatio, double height)
Parameters:respectLockAspectRatiobool

A value indicating whether the aspect ratio lock should be respected.

heightdouble

The new height.

Set the width and optionally adjust height to respect the current aspect ratio.

C#
public void SetWidth(bool respectLockAspectRatio, double width)
Parameters:respectLockAspectRatiobool

A value indicating whether the aspect ratio lock should be respected.

widthdouble

The new width.

Properties

Gets or sets the alternative text describing the shape for accessibility.

C#
public string Description { get; set; }
Property Value:

The description (alternative text).

Gets or sets the fill applied to the interior of the shape.

C#
public Fill Fill { get; set; }

Gets or sets the shape height in document units.

C#
public double Height { get; set; }
Property Value:

The height.

Gets or sets whether the shape is horizontally flipped (mirrored along the Y-axis).

C#
public bool IsHorizontallyFlipped { get; set; }
Property Value:

The value indicating if the shape is horizontally flipped.

Gets or sets whether the shape is vertically flipped (mirrored along the X-axis).

C#
public bool IsVerticallyFlipped { get; set; }
Property Value:

The value indicating if the shape is vertically flipped.

Gets the hyperlink target associated with the shape, if any.

C#
public string Link { get; }

Gets or sets whether the width-to-height ratio is preserved during resize operations.

C#
public bool LockAspectRatio { get; set; }
Property Value:

The value indicating whether the aspect ratio between the width and height should remain constant.

Gets or sets the user-defined name for this shape, useful for identification.

C#
public string Name { get; set; }
Property Value:

The name.

Gets the outline (stroke) applied to the shape’s border.

C#
public Outline Outline { get; }

Gets or sets the rotation angle applied to the shape in degrees.

C#
public double RotationAngle { get; set; }
Property Value:

The rotation angle.

Size

Size

Gets or sets the shape size; when not set, it may be auto-initialized.

C#
public Size Size { get; set; }
Property Value:

The size.

Gets or sets the title (caption) displayed for the shape in some viewers.

C#
public string Title { get; set; }
Property Value:

The title (caption).

Gets or sets the shape width in document units.

C#
public double Width { get; set; }
Property Value:

The width.