Floater Konstruktoren

Definition

Initialisiert eine neue Instanz der Floater-Klasse.

Überlädt

Floater()

Initialisiert eine neue Instanz der Floater-Klasse.

Floater(Block)

Initialisiert eine neue Instanz der Floater-Klasse mit dem angegebenen Block-Objekt als ursprünglichem Inhalt.

Floater(Block, TextPointer)

Initialisiert eine neue Instanz der Floater-Klasse mit dem angegebenen Block-Objekt als ursprünglichen Inhalt und einen TextPointer, mit dem eine Einfügeposition für den neuen Floater angegeben wird.

Floater()

Initialisiert eine neue Instanz der Floater-Klasse.

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

Gilt für:

Floater(Block)

Initialisiert eine neue Instanz der Floater-Klasse mit dem angegebenen Block-Objekt als ursprünglichem Inhalt.

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)

Parameter

childBlock
Block

Der ursprüngliche Inhalt des neuen Floater.

Beispiele

Im folgenden Beispiel wird die Verwendung dieses Konstruktors veranschaulicht.

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)

Gilt für:

Floater(Block, TextPointer)

Initialisiert eine neue Instanz der Floater-Klasse mit dem angegebenen Block-Objekt als ursprünglichen Inhalt und einen TextPointer, mit dem eine Einfügeposition für den neuen Floater angegeben wird.

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)

Parameter

childBlock
Block

Der ursprüngliche Inhalt des neuen Floater. Dieser Parameter kann null sein. In diesem Fall wird kein Block eingefügt.

insertionPosition
TextPointer

Die Position, an der das Floater-Element nach der Erstellung eingefügt werden soll.

Beispiele

Im folgenden Beispiel wird die Verwendung dieses Konstruktors veranschaulicht.

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)

Gilt für: