List.ListItems 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
의 ListItemCollection 내용을 구성하는 요소를 포함하는 ListItem 값을 List가져옵니다.
public:
property System::Windows::Documents::ListItemCollection ^ ListItems { System::Windows::Documents::ListItemCollection ^ get(); };
public System.Windows.Documents.ListItemCollection ListItems { get; }
member this.ListItems : System.Windows.Documents.ListItemCollection
Public ReadOnly Property ListItems As ListItemCollection
속성 값
ListItemCollection 의 내용을 List구성하는 요소를 포함하는 ListItem A.
이 속성에는 기본값이 없습니다.
예제
다음 예제에서는 속성을 사용 하 여 일반적인 작업을 List 수행 하는 방법을 보여 줍니다 ListItems .
// Add ListItems to the List.
List listx = new List();
Span spanx = new Span();
listx.ListItems.Add(new ListItem(new Paragraph(new Run("A bit of text content..."))));
listx.ListItems.Add(new ListItem(new Paragraph(new Run("A bit more text content..."))));
// Insert a ListItem at the begining of the List.
ListItem lix = new ListItem(new Paragraph(new Run("ListItem to insert...")));
listx.ListItems.InsertBefore(listx.ListItems.FirstListItem, lix);
// Get the number of ListItems in the List.
int countListItems = listx.ListItems.Count;
// Remove the last ListItem from the List.
listx.ListItems.Remove(listx.ListItems.LastListItem);
// Clear all of the ListItems from the List.
listx.ListItems.Clear();
' Add ListItems to the List.
Dim listx As New List()
Dim spanx As New Span()
listx.ListItems.Add(New ListItem(New Paragraph(New Run("A bit of text content..."))))
listx.ListItems.Add(New ListItem(New Paragraph(New Run("A bit more text content..."))))
' Insert a ListItem at the begining of the List.
Dim lix As New ListItem(New Paragraph(New Run("ListItem to insert...")))
listx.ListItems.InsertBefore(listx.ListItems.FirstListItem, lix)
' Get the number of ListItems in the List.
Dim countListItems As Integer = listx.ListItems.Count
' Remove the last ListItem from the List.
listx.ListItems.Remove(listx.ListItems.LastListItem)
' Clear all of the ListItems from the List.
listx.ListItems.Clear()
설명
이 속성에서 ListItemCollection 반환된 내용을 열거하거나 요소의 내용을 조작하는 데 List 사용합니다.