Layout Class
Represents a base class for specifying element's layout properties, such as position and size.
- Inheritance:
- System.ObjectLayout
- Derived
Remarks
DrawingElement (Picture, TextBox or Shape) can be embedded / positioned (by using 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. DrawingElement's position and size are contained in 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 Inline(Double, Double, LengthUnit) or Floating(HorizontalPosition, VerticalPosition, Size).
For more information, see
Properties
EffectPadding
Gets or sets the additional padding added to each edge of the element (top, bottom, left, right) in order to compensate for any drawing effects applied to the element.
Property Value
The additional padding added to each edge of the element (top, bottom, left, right) in order to compensate for any drawing effects applied to the element.
Remarks
EffectPadding is currently not supported when exporting a document to PDF, XPS, or image formats.
IsFloating
Gets a value indicating whether element which has this Layout instance applied is floating around page main content.
public abstract bool IsFloating { get; }
Public MustOverride ReadOnly Property IsFloating As Boolean
Property Value
- System.Boolean
true if element which has this Layout instance applied is floating around page main content; otherwise, false.
Remarks
DrawingElement (Picture, TextBox or Shape) can be embedded / positioned (by using 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. DrawingElement's position and size are contained in 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 Inline(Double, Double, LengthUnit) or Floating(HorizontalPosition, VerticalPosition, Size).
For more information, see
LockAspectRatio
Gets or sets the value indicating whether the aspect ratio is locked.
Property Value
- System.Boolean
true if aspect ratio is locked; otherwise, false.
Remarks
Default value of this property is false.
Size
Gets or sets the size.
Property Value
The size.
Transform
Gets or sets the transformation.
Property Value
The transformation.
Methods
Floating(HorizontalPosition, VerticalPosition, Size)
Creates a layout used when element should be floating in a document page and rest of the page content should wrap around it.
public static FloatingLayout Floating(HorizontalPosition horizontalPosition, VerticalPosition verticalPosition, Size size)
Public Shared Function Floating(horizontalPosition As HorizontalPosition, verticalPosition As VerticalPosition, size As Size) As FloatingLayout
Parameters
horizontalPosition
- HorizontalPosition
The horizontal position of a floating element.
verticalPosition
- VerticalPosition
The vertical position of a floating element.
size
- Size
The size of a floating element.
Returns
A new instance of a FloatingLayout type which contains all floating element's layout-related properties.
Inline(Size)
Creates a layout used when element should be embedded in-line with the rest of the content.
public static InlineLayout Inline(Size size)
Public Shared Function Inline(size As Size) As InlineLayout
Parameters
size
- Size
The size of the embedded element.
Returns
A new instance of an InlineLayout type which contains all in-line embedded element's layout-related properties.
Inline(Double, Double, LengthUnit)
Creates a layout used when element should be embedded in-line with the rest of the content.
public static InlineLayout Inline(double width, double height, LengthUnit unit)
Public Shared Function Inline(width As Double, height As Double, unit As LengthUnit) As InlineLayout
Parameters
width
- System.Double
The width of the embedded element.
height
- System.Double
The height of the embedded element.
unit
- LengthUnit
The measurement unit used for width
and height
.
Returns
A new instance of an InlineLayout type which contains all in-line embedded element's layout-related properties.