Floater Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public:
Floater();
public Floater ();
Public Sub New ()
Applies to
Floater(Block)
public:
Floater(System::Windows::Documents::Block ^ childBlock);
public Floater (System.Windows.Documents.Block childBlock);
new System.Windows.Documents.Floater : System.Windows.Documents.Block -> System.Windows.Documents.Floater
Public Sub New (childBlock As Block)
Parameters
Examples
The following example demonstrates how to use this constructor.
Paragraph parx = new Paragraph(new Run("Floater content..."));
Floater flotx = new Floater(parx);
Dim parx3 As New Paragraph(New Run("Floater content..."))
Dim flotx3 As New Floater(parx3)
Applies to
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.
public:
Floater(System::Windows::Documents::Block ^ childBlock, System::Windows::Documents::TextPointer ^ insertionPosition);
public Floater (System.Windows.Documents.Block childBlock, System.Windows.Documents.TextPointer insertionPosition);
new System.Windows.Documents.Floater : System.Windows.Documents.Block * System.Windows.Documents.TextPointer -> System.Windows.Documents.Floater
Public Sub New (childBlock As Block, insertionPosition As TextPointer)
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.
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);
Dim spanx4 As New Span()
Dim parx4 As 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.
Dim flotx4 As New Floater(parx4, spanx4.ContentStart)