New to Telerik UI for WinForms? Start a free 30-day trial

Defines the ordered level formatting used by a numbered or bulleted list.

Definition

Namespace:Telerik.WinForms.Documents.Model

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class ListStyle

Inheritance: objectListStyle

Constructors

Initializes an empty list style with no assigned identifier.

C#
public ListStyle()

Creates a list style with a replacement identifier and copies each level's numbering, indentation, and span formatting, along with the list link names. The default flag and level StyleName values are not copied.

C#
public ListStyle(int id, ListStyle source)
Parameters:idint

The identifier to assign to the copy.

sourceListStyle

The list style whose levels and links are copied.

Initializes an empty list style and assigns the specified identifier when one is provided.

C#
public ListStyle(int? id)
Parameters:idint?

The identifier to assign, or null to leave the identifier unassigned.

Creates a new list style by copying each level's numbering, indentation, and span formatting, along with the list link names. The identifier is reset, the default flag is not copied, and level StyleName values are not preserved.

C#
public ListStyle(ListStyle source)
Parameters:sourceListStyle

The list style whose levels and links are copied.

Fields

Gets the number of list levels used by the built-in list styles.

C#
public static readonly int ListLevels

Properties

Gets or sets whether this definition is marked as a default list preset.

C#
[XamlSerializable]
public bool IsDefault { get; set; }

Gets the formatting definition for each list depth, in level order.

C#
[XamlSerializable]
public NotifiableCollection<ListLevelStyle> Levels { get; set; }

Gets or sets the name of the numbering style that supplies this list style's effective levels. The linked style must resolve to a numbering style in the document's style repository.

C#
[XamlSerializable]
public string NumStyleLink { get; set; }

Gets or sets the name exposed for this list style in the multilevel-list gallery.

C#
[XamlSerializable]
public string StyleLink { get; set; }

Methods

Compares the level values and both link names; the identifier, default flag, and each level's StyleName are ignored.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with this list style.

Returns:

bool

true if the level definitions and link names match; otherwise, false.

Overrides: object.Equals(object)

Computes a hash code from the list levels; the identifier, default flag, and link names do not contribute.

C#
public override int GetHashCode()
Returns:

int

A hash code for this list style.

Overrides: object.GetHashCode()