Skip to main content
All docs
V25.1
  • DrawingObject.Width Property

    Gets or sets the shape’s absolute width.

    Namespace: DevExpress.XtraRichEdit.API.Native

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

    NuGet Package: DevExpress.RichEdit.Core

    Declaration

    float Width { get; set; }

    Property Value

    Type Description
    Single

    The width in measurement units specified by the Document.Unit property.

    Remarks

    The following code creates a rectangle and specifies its height and width:

    Document document = wordProcessor.Document;
    // Set the measurement unit to inches.
    document.Unit = DevExpress.Office.DocumentUnit.Inch;
    // Create a rectangle.
    Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle);
    // Specify its width and height.
    rectangle.Width = 2;
    rectangle.Height = 1;
    
    See Also