語言

ListItem 建構函式

定義

初始化 ListItem 類別的新執行個體。

多載

名稱 Description
ListItem()

初始化一個新的、空的類別實例 ListItem 。

ListItem(Paragraph)

初始化該類別的新實例 ListItem ,將指定 Paragraph 物件作為新 ListItem的初始內容。

ListItem()

初始化一個新的、空的類別實例 ListItem 。

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

適用於

ListItem(Paragraph)

初始化該類別的新實例 ListItem ,將指定 Paragraph 物件作為新 ListItem的初始內容。

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

參數

paragraph
Paragraph

一個 Paragraph 指定新 ListItem的初始內容的物件。

範例

以下範例展示了此建構子的使用方法。

// This line uses the ListItem constructor to create a new ListItem
// and initialize it with the specified Paragraph.
ListItem lix = new ListItem(new Paragraph(new Run("ListItem text...")));
// This line uses the List constructor to create a new List and populate
// it with the previously created ListItem.
List listx = new List(lix);
' This line uses the ListItem constructor to create a new ListItem
' and initialize it with the specified Paragraph.
Dim lix As New ListItem(New Paragraph(New Run("ListItem text...")))
' This line uses the List constructor to create a new List and populate
' it with the previously created ListItem.
Dim listx As New List(lix)

適用於