Floater Constructors

Definition

Initializes a new instance of the Floater class.

Overloads

Floater()

Initializes a new instance of the Floater class.

Floater(Block)

Initializes a new instance of the Floater class with the specified Block object as its initial content.

Floater(Block, TextPointer)

Initializes a new instance of the Floater class with the specified Block object as its initial content, and a TextPointer that specifies an insertion position for the new Floater.

Floater()

Initializes a new instance of the Floater class.

C#
public Floater();

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Floater(Block)

Initializes a new instance of the Floater class with the specified Block object as its initial content.

C#
public Floater(System.Windows.Documents.Block childBlock);

Parameters

childBlock
Block

The initial content of the new Floater.

Examples

The following example demonstrates how to use this constructor.

C#
Paragraph parx = new Paragraph(new Run("Floater content..."));
Floater flotx = new Floater(parx);

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

Floater(Block, TextPointer)

Initializes a new instance of the Floater class with the specified Block object as its initial content, and a TextPointer that specifies an insertion position for the new Floater.

C#
public Floater(System.Windows.Documents.Block childBlock, System.Windows.Documents.TextPointer insertionPosition);

Parameters

childBlock
Block

The initial content of the new Floater. This parameter can be null, in which case no Block is inserted.

insertionPosition
TextPointer

The position at which to insert the Floater element after it is created.

Examples

The following example demonstrates how to use this constructor.

C#
Span spanx = new Span();
Paragraph parx = new Paragraph(new Run("Floater content..."));

// This will populate the Floater with the Paragraph parx, and insert
// the Floater at the beginning of the Span spanx.
Floater flotx = new Floater(parx, spanx.ContentStart);

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9