共用方式為


Figure 建構函式

定義

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

多載

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,在這個情況下,不會插入 Block

insertionPosition
TextPointer

TextPointer,指定 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)

適用於