Click or drag to resize

DrawingElementLayout Property

Gets or sets the DrawingElement layout (position and size).

Namespace:  GemBox.Document.Drawing
Assembly:  GemBox.Document (in GemBox.Document.dll) Version:
public Layout Layout { get; set; }

Property Value

Type: Layout
The DrawingElement layout (position and size).
ArgumentNullExceptionValue is .

Drawing elements (Picture, TextBox or Shape) can be embedded / positioned (by using DrawingElement.Layout property):

  • In line with the text (InlineLayout type) - affects the line height and layout of its line (like a character glyph of similar size).
  • Floating within the text relative to the page (FloatingLayout type) - affects the layout of its surrounding content which is either wrapped around or in-front / behind the floating element.

Besides position, embeddable element must also have size specified. Drawing element's position and size are contained in DrawingElement.Layout property.

Embedded element's layout can be specified by either instantiating appropriate Layout derived type, such as InlineLayout or FloatingLayout, or by using factory methods Layout.Inline() or Layout.Floating().

For more information, see Shapes and Layout article.

See Also