語言

Figure 建構函式

定義

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

多載

名稱 Description
Figure()

初始化一個新的、空的類別實例 Figure 。

Figure(Block)

初始化該類別的新實例 Figure ,將指定 Block 物件作為新 Figure的初始內容。

Figure(Block, TextPointer)

初始化 Figure 類別的新實例,以指定的 Block 對象作為新 Figure的初始內容,以及指定新 TextPointer 專案插入位置的 Figure。

Figure()

初始化一個新的、空的類別實例 Figure 。

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

適用於

Figure(Block)

初始化該類別的新實例 Figure ,將指定 Block 物件作為新 Figure的初始內容。

public:
 Figure(System::Windows::Documents::Block ^ childBlock);
public Figure(System.Windows.Documents.Block childBlock);
new System.Windows.Documents.Figure : System.Windows.Documents.Block -> System.Windows.Documents.Figure
Public Sub New (childBlock As Block)

參數

childBlock
Block

一個 Block 指定新 Figure的初始內容的物件。

範例

下列範例示範使用此建構函式。

Paragraph parx = new Paragraph(new Run("Figure content..."));
Figure figx = new Figure(parx);
Dim parx1 As New Paragraph(New Run("Figure content..."))
Dim figx1 As New Figure(parx1)

適用於

Figure(Block, TextPointer)

初始化 Figure 類別的新實例,以指定的 Block 對象作為新 Figure的初始內容,以及指定新 TextPointer 專案插入位置的 Figure。

public:
 Figure(System::Windows::Documents::Block ^ childBlock, System::Windows::Documents::TextPointer ^ insertionPosition);
public Figure(System.Windows.Documents.Block childBlock, System.Windows.Documents.TextPointer insertionPosition);
new System.Windows.Documents.Figure : System.Windows.Documents.Block * System.Windows.Documents.TextPointer -> System.Windows.Documents.Figure
Public Sub New (childBlock As Block, insertionPosition As TextPointer)

參數

childBlock
Block

一個 Block 指定新 Figure的初始內容的物件。 此參數可為 null,此時插入 no Block 。

insertionPosition
TextPointer

TextPointer A 指定元件建立後插入Figure的位置,或null不自動插入。

範例

下列範例示範使用此建構函式。

Span spanx = new Span();
Paragraph parx = new Paragraph(new Run("Figure content..."));
// This will populate the Figure with the Paragraph parx, and insert
// the Figure at the beginning of the Span spanx.
Figure figx = new Figure(parx, spanx.ContentStart);
Dim spanx2 As New Span()
Dim parx2 As New Paragraph(New Run("Figure content..."))
    ' This will populate the Figure with the Paragraph parx, and insert
    ' the Figure at the beginning of the Span spanx.
Dim figx2 As New Figure(parx2, spanx2.ContentStart)

適用於