List 建構函式

定義

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

多載

List()

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

List(ListItem)

初始化 List 類別的新執行個體,並將指定的 ListItem 物件做為新 List 的初始內容。

List()

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

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

適用於

List(ListItem)

初始化 List 類別的新執行個體,並將指定的 ListItem 物件做為新 List 的初始內容。

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

參數

listItem
ListItem

ListItem 物件,用來指定新 List 的初始內容。

範例

下列範例示範此建構函式的使用方式。

// 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)

適用於