GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    FloatingLayout Class

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents a floating Layout which is used to embed document element in a page outside of the main content flow. Main content flow is usually wrapped around embedded element.

    • C#
    • VB.NET
    public sealed class FloatingLayout : Layout
    Public NotInheritable Class FloatingLayout
        Inherits Layout
    Inheritance:
    System.Object
    Layout
    FloatingLayout
    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, seeShapes and Layoutarticle.

    Constructors

    FloatingLayout(HorizontalPosition, VerticalPosition, Size)

    Initializes a new instance of the FloatingLayout class with the specified horizontal position, vertical position and size of a floating element.

    • C#
    • VB.NET
    public FloatingLayout(HorizontalPosition horizontalPosition, VerticalPosition verticalPosition, Size size)
    Public Sub New(horizontalPosition As HorizontalPosition, verticalPosition As VerticalPosition, size As Size)
    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.

    Properties

    DistanceFromText

    Gets or sets the distances between the edges of a floating element and any subsequent text within the document.

    • C#
    • VB.NET
    public Padding DistanceFromText { get; set; }
    Public Property DistanceFromText As Padding
    Property Value
    Padding

    The distances between the edges of a floating element and any subsequent text within the document.

    Remarks

    Default value is: Top: 0 cm, Bottom: 0 cm, Left: 0.32 cm, Right: 0.32 cm.

    HorizontalPosition

    Gets or sets the horizontal position.

    • C#
    • VB.NET
    public HorizontalPosition HorizontalPosition { get; set; }
    Public Property HorizontalPosition As HorizontalPosition
    Property Value
    HorizontalPosition

    The horizontal position.

    IsFloating

    Always gets a true value because member's type is FloatingLayout.

    • C#
    • VB.NET
    public override bool IsFloating { get; }
    Public Overrides ReadOnly Property IsFloating As Boolean
    Property Value
    System.Boolean

    true value because member's type is FloatingLayout.

    Overrides
    Layout.IsFloating
    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, seeShapes and Layoutarticle.

    VerticalPosition

    Gets or sets the vertical position.

    • C#
    • VB.NET
    public VerticalPosition VerticalPosition { get; set; }
    Public Property VerticalPosition As VerticalPosition
    Property Value
    VerticalPosition

    The vertical position.

    WrappingStyle

    Gets or sets the setting for how text is wrapped around the floating element.

    • C#
    • VB.NET
    public TextWrappingStyle WrappingStyle { get; set; }
    Public Property WrappingStyle As TextWrappingStyle
    Property Value
    TextWrappingStyle

    The setting for how text is wrapped around the floating element.

    Remarks

    Default value is Square.

    WrapText

    Gets or sets the setting for how text can wrap around the floating element's left and right sides.

    • C#
    • VB.NET
    public WrapTextType WrapText { get; set; }
    Public Property WrapText As WrapTextType
    Property Value
    WrapTextType

    The setting for how text can wrap around the floating element's left and right sides.

    Remarks

    Default value is Both.

    Inherited 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.

    (Inherited from Layout)

    LockAspectRatio

    Gets or sets the value indicating whether the aspect ratio is locked.

    (Inherited from Layout)

    Size

    Gets or sets the size.

    (Inherited from Layout)

    Transform

    Gets or sets the transformation.

    (Inherited from Layout)

    Inherited 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.

    (Inherited from Layout)

    Inline(System.Double, System.Double, LengthUnit)

    Creates a layout used when element should be embedded in-line with the rest of the content.

    (Inherited from Layout)

    Inline(Size)

    Creates a layout used when element should be embedded in-line with the rest of the content.

    (Inherited from Layout)

    Examples

    Shapes example
    Text Boxes example
    Pictures example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.