Floater 建構函式

定義

初始化 Floater 類別的新執行個體。

多載

Floater()

初始化 Floater 類別的新執行個體。

Floater(Block)

初始化 Floater 類別的新執行個體,並將指定的 Block 物件做為其初始內容。

Floater(Block, TextPointer)

初始化 Floater 類別的新執行個體,並將指定的 Block 物件做為其初始內容,以及會替新 TextPointer 指定插入位置的 Floater

Floater()

初始化 Floater 類別的新執行個體。

public:
 Floater();
public Floater ();
Public Sub New ()

適用於

Floater(Block)

初始化 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)

參數

childBlock
Block

Floater 的初始內容。

範例

下列範例示範如何使用這個建構函式。

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)

適用於

Floater(Block, TextPointer)

初始化 Floater 類別的新執行個體,並將指定的 Block 物件做為其初始內容,以及會替新 TextPointer 指定插入位置的 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)

參數

childBlock
Block

Floater 的初始內容。 這個參數可以是 null,在此情況下,不會插入 Block

insertionPosition
TextPointer

在建立 Floater 項目後將插入該項目的位置。

範例

下列範例示範如何使用這個建構函式。

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)

適用於