Skip to end of metadata
Go to start of metadata

Remarks

AnchoredBlock is an abstract class that provides a base for Inline elements that are used to anchor Block elements to flow content. In WPF, AnchoredBlock is inherited to Floater and Figure elements. Currently, Intersoft FlowDocument only supports Floater element.

Floater are used to embed content to FlowDocument with placement properties that can be customized independent of the primary content flow. Floater elements are often used to highlight or accentuate portions of content, to host supporting images or other content within the main content flow, or to inject loosely related content such as advertisements. Floater is a good place to put more free-flowing content that flows similar to the main page content, but is separated from it.

Floater can host multiple Block elements. You can specify a specific width to Floater element using Width property. Floater element can be horizontally aligned, either to the Left, Center, Right, or Stretch. The other content contained within the same Block element will flow around Floater element if the space is available.

As the child of AnchoredBlock, Floater inherits the behavior of AnchoredBlock class. You can specify several properties that are usually available in Block element, such as border and line spacing formatting, Margin, Padding, and TextAlignment. If Margin and Padding properties are not specified, Floater element will automatically use 10 pixel for each property.

AXML

If the content of Floater element exceeds the page boundaries, it will paginates to the next page. When Floater element paginates to the next page, it will maintain the Margin and Padding configuration. The following screenshot shows how Floater element will paginate if the content exceeds the page boundaries.

Definition

public class Floater : AnchoredBlock

Summary

The following table summarizes the members exposed in this class.

Public Constructors

Floater Constructor()Initializes a new instance of the Floater class.
Floater Constructor(Block)Initializes a new instance of the Floater class.

Public Properties

HorizontalAlignmentGets or sets the horizontal alignment of the element.
WidthGets or sets the width of the element.

Fields

HorizontalAlignmentPropertyIdentifies the HorizontalAlignment dependency property.
WidthPropertyIdentifies the Width dependency property.

Public Constructors

public Floater()

Initializes a new instance of the Floater class.

public Floater(Block block)

Initializes a new instance of the Floater class.

Parameters

block 

 

Public Properties

public HorizontalAlignment HorizontalAlignment { get; set; }

Gets or sets the horizontal alignment of the element.

public double Width { get; set; }

Gets or sets the width of the element.

Fields

public static readonly DependencyProperty HorizontalAlignmentProperty

Identifies the HorizontalAlignment dependency property.

public static readonly DependencyProperty WidthProperty

Identifies the Width dependency property.

  • No labels