Floater 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 Floater 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| Floater() |
初始化 Floater 类的新实例。 |
| Floater(Block) | |
| Floater(Block, TextPointer) |
使用指定的 Floater 对象作为初始内容初始化 Block 类的新实例,并使用指定新 TextPointer插入位置的 Floater。 |
Floater()
Floater(Block)
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)
参数
示例
以下示例演示如何使用此构造函数。
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)
适用于
Floater(Block, TextPointer)
使用指定的 Floater 对象作为初始内容初始化 Block 类的新实例,并使用指定新 TextPointer插入位置的 Floater。
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)
参数
- insertionPosition
- TextPointer
在其创建后插入 Floater 元素的位置。
示例
以下示例演示如何使用此构造函数。
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)