List Constructor (ListItem)

 

Initializes a new instance of the List class, taking a specified ListItem object as the initial contents of the new List.

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public List(
	ListItem listItem
)

Parameters

listItem
Type: System.Windows.Documents.ListItem

A ListItem object specifying the initial contents of the new List.

The following example demonstrates usage of this constructor.

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

.NET Framework
Available since 3.0
Return to top
Show: