語言

Floater 建構函式

定義

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

多載

名稱 Description
Floater()

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

Floater(Block)

初始化一個以指定Floater物件為初始內容的類別新實例Block。

Floater(Block, TextPointer)

初始化一個以指定Floater物件為初始內容的類別新實例Block,並 TextPointer A 指定新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 A 指定新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,此時插入 no 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)

適用於