Click or drag to resize
Layout Class
Represents a base class for specifying element's layout properties, such as position and size.
Inheritance Hierarchy

Namespace: GemBox.Document
Assembly: GemBox.Document (in GemBox.Document.dll) Version: 25.3.30.1231
Syntax
public abstract class Layout

The Layout type exposes the following members.

Methods
  NameDescription
Public methodStatic memberFloating
Creates a layout used when element should be floating in a document page and rest of the page content should wrap around it.
Public methodStatic memberInline(Size)
Creates a layout used when element should be embedded in-line with the rest of the content.
Public methodStatic memberInline(Double, Double, LengthUnit)
Creates a layout used when element should be embedded in-line with the rest of the content.
Top
Properties
  NameDescription
Public propertyIsFloating
Gets a value indicating whether element which has this Layout instance applied is floating around page main content.
Public propertySize
Gets or sets the size.
Top
Remarks

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