Figure Constructors

Definition

Initializes a new instance of the Figure class.

Overloads

Figure()

Initializes a new, empty instance of the Figure class.

Figure(Block)

Initializes a new instance of the Figure class, taking a specified Block object as the initial contents of the new Figure.

Figure(Block, TextPointer)

Initializes a new instance of the Figure class, taking a specified Block object as the initial contents of the new Figure, and a TextPointer specifying an insertion position for the new Figure element.

Figure()

Initializes a new, empty instance of the Figure class.

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

Applies to

Figure(Block)

Initializes a new instance of the Figure class, taking a specified Block object as the initial contents of the new 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)

Parameters

childBlock
Block

A Block object specifying the initial contents of the new Figure.

Examples

The following example demonstrates the use of this constructor.

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)

Applies to

Figure(Block, TextPointer)

Initializes a new instance of the Figure class, taking a specified Block object as the initial contents of the new Figure, and a TextPointer specifying an insertion position for the new Figure element.

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)

Parameters

childBlock
Block

A Block object specifying the initial contents of the new Figure. This parameter may be null, in which case no Block is inserted.

insertionPosition
TextPointer

A TextPointer specifying an insertion position at which to insert the Figure element after it is created, or null for no automatic insertion.

Examples

The following example demonstrates the use of this constructor.

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)

Applies to