Skip to end of metadata
Go to start of metadata

Remarks

List is used to create a bulleted or numeric list. List element can only contain ListItem element collection.

Set the MarkerStyle property to a TextMarkerStyle enumeration value to determine the style of the list. The built-in marker styles provided in FlowDocument are Disc, Circle, Square, Box, LowerRoman, UpperRoman, LowerLatin, UpperLatin, Decimal, and None.

AXML

You can also specify custom image as the marker style by selecting Custom as the value of MarkerStyle property and specify the MarkerSource property to the selected image Uri.

XAML

You can specify the start index of the list using StartIndex property. Note that this property will be used when the marker style is one of the following: LowerRoman, UpperRoman, LowerLatin, UpperLatin, and Decimal.

By default, a List element will be indented 25 pixel from its original offset. You can customize this configuration using Margin property. Additionally, you can set the space between the marker style and the content using MarkerOffset property. You can use the MarkerAlignment property to set the alignment of marker style. The default value is Right.

XAML

Definition

public class List : Block

Summary

The following table summarizes the members exposed in this class.

Public Constructors

List Constructor()Initializes a new instance of the List class.
List Constructor(ListItem)Initializes a new instance of the List class.

Public Properties

ListItemsGets or sets the ListItem collection as the children of this element
MarkerAlignmentGets or sets the horizontal alignment applied to the marker element.
MarkerOffsetGets or sets the space between the marker and the content of a list item.
MarkerSourceGets or sets the Uri that will be applied as marker when its style is set to Custom.
MarkerStyleGets or sets the marker style of List element.
StartIndexGets or sets the start index of the list.

Fields

ListItemsPropertyIdentifies the ListItems dependency property.
MarkerAlignmentPropertyIdentifies the MarkerAlignment dependency property.
MarkerOffsetPropertyIdentifies the MarkerOffset dependency property.
MarkerSourcePropertyIdentifies the MarkerSource dependency property.
MarkerStylePropertyIdentifies the MarkerStyle dependency property.
StartIndexPropertyIdentifies the StartIndex dependency property.

Public Constructors

public List()

Initializes a new instance of the List class.

public List(ListItem item)

Initializes a new instance of the List class.

Parameters

item 

 

Public Properties

public ListItemCollection ListItems { get; set; }

Gets or sets the ListItem collection as the children of this element

public MarkerAlignment MarkerAlignment { get; set; }

Gets or sets the horizontal alignment applied to the marker element.

public double MarkerOffset { get; set; }

Gets or sets the space between the marker and the content of a list item.

public Uri MarkerSource { get; set; }

Gets or sets the Uri that will be applied as marker when its style is set to Custom.

public TextMarkerStyle MarkerStyle { get; set; }

Gets or sets the marker style of List element.

public int StartIndex { get; set; }

Gets or sets the start index of the list.

Fields

public static readonly DependencyProperty ListItemsProperty

Identifies the ListItems dependency property.

public static readonly DependencyProperty MarkerAlignmentProperty

Identifies the MarkerAlignment dependency property.

public static readonly DependencyProperty MarkerOffsetProperty

Identifies the MarkerOffset dependency property.

public static readonly DependencyProperty MarkerSourceProperty

Identifies the MarkerSource dependency property.

public static readonly DependencyProperty MarkerStyleProperty

Identifies the MarkerStyle dependency property.

public static readonly DependencyProperty StartIndexProperty

Identifies the StartIndex dependency property.

  • No labels