Share via


Paragraph 构造函数

定义

初始化 Paragraph 类的新实例。

重载

Paragraph()

初始化 Paragraph 类的新的空实例。

Paragraph(Inline)

初始化 Paragraph 类的一个新实例,将指定的 Inline 对象作为其初始内容。

Paragraph()

初始化 Paragraph 类的新的空实例。

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

适用于

Paragraph(Inline)

初始化 Paragraph 类的一个新实例,将指定的 Inline 对象作为其初始内容。

public:
 Paragraph(System::Windows::Documents::Inline ^ inline);
public Paragraph (System.Windows.Documents.Inline inline);
new System.Windows.Documents.Paragraph : System.Windows.Documents.Inline -> System.Windows.Documents.Paragraph
Public Sub New (inline As Inline)

参数

inline
Inline

Inline 对象,它指定新的 Paragraph 的初始内容。

示例

以下示例演示此构造函数的用法。

// A child Inline element for the new Paragraph element.
Run runx = new Run("Text to be hosted in the new paragraph...");

// After this line executes, the new element "parx"
// contains the specified Inline element, "runx".
Paragraph parx = new Paragraph(runx);
' A child Inline element for the new Paragraph element.
Dim runx As New Run("Text to be hosted in the new paragraph...")

' After this line executes, the new element "parx"
' contains the specified Inline element, "runx".
Dim parx As New Paragraph(runx)

适用于