All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Shape.SizeRelative Property

Gets or sets the shape’s relative size.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v21.1.Core.dll

Declaration

SizeF SizeRelative { get; set; }

Property Value

Type Description
SizeF

Specifies values that define the ratio of the shape width and height to the width and height of the given elements. Valid values range from 0 (0%) to 10 (1000%).

Remarks

Use the RelativeHorizontalSize and RelativeVerticalSize properties to specify elements relative to which the shape width and height are calculated.

The following example creates a rectangle and sets its size to 50% of the page size:

Document document = wordProcessor.Document;
// Create a rectangle.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle);
// Set the rectangle size to 50% of the page size.
rectangle.RelativeHorizontalSize = ShapeRelativeHorizontalSize.Page;
rectangle.RelativeVerticalSize = ShapeRelativeVerticalSize.Page;
rectangle.SizeRelative = new SizeF(0.5f, 0.5f);
See Also