Figure Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av Figure klassen.
Överlagringar
| Name | Description |
|---|---|
| Figure() |
Initierar en ny, tom instans av Figure klassen. |
| Figure(Block) |
Initierar en ny instans av Figure klassen och tar ett angivet Block objekt som det första innehållet i den nya Figure. |
| Figure(Block, TextPointer) |
Initierar en ny instans av Figure klassen, med ett angivet Block objekt som det första innehållet i det nya Figure, och en TextPointer infogningsposition för det nya Figure elementet. |
Figure()
Initierar en ny, tom instans av Figure klassen.
public:
Figure();
public Figure();
Public Sub New ()
Gäller för
Figure(Block)
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)
Parametrar
Exempel
I följande exempel visas hur konstruktorn används.
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)
Gäller för
Figure(Block, TextPointer)
Initierar en ny instans av Figure klassen, med ett angivet Block objekt som det första innehållet i det nya Figure, och en TextPointer infogningsposition för det nya Figure elementet.
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)
Parametrar
- childBlock
- Block
Ett Block objekt som anger det första innehållet i den nya Figure. Den här parametern kan vara null, i vilket fall ingen Block infogas.
- insertionPosition
- TextPointer
En TextPointer som anger en infogningsposition där elementet Figure ska infogas när det har skapats, eller null för ingen automatisk infogning.
Exempel
I följande exempel visas hur konstruktorn används.
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)