本文整理匯總了C#中System.Windows.Documents.List類的典型用法代碼示例。如果您正苦於以下問題:C# List類的具體用法?C# List怎麽用?C# List使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
List類屬於System.Windows.Documents命名空間,在下文中一共展示了List類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: List
List listx = new List();
// Set the space between the markers and list content to 25 DIP.
listx.MarkerOffset = 25;
// Use uppercase Roman numerals.
listx.MarkerStyle = TextMarkerStyle.UpperRoman;
// Start list numbering at 5.
listx.StartIndex = 5;
// Create the list items that will go into the list.
ListItem liV = new ListItem(new Paragraph(new Run("Boron")));
ListItem liVI = new ListItem(new Paragraph(new Run("Carbon")));
ListItem liVII = new ListItem(new Paragraph(new Run("Nitrogen")));
ListItem liVIII = new ListItem(new Paragraph(new Run("Oxygen")));
ListItem liIX = new ListItem(new Paragraph(new Run("Fluorine")));
ListItem liX = new ListItem(new Paragraph(new Run("Neon")));
// Finally, add the list items to the list.
listx.ListItems.Add(liV);
listx.ListItems.Add(liVI);
listx.ListItems.Add(liVII);
listx.ListItems.Add(liVIII);
listx.ListItems.Add(liIX);
listx.ListItems.Add(liX);