Returns an array of the names of all formatting styles, the document contains. This property can be used to fill a combo box or a menu.

Syntax

public string[] StyleNames { get; }
Public ReadOnly Property StyleNames() As String()

Examples

The following XAML example shows how to bind the StyleName property to a combo box which contains all style names returned by the StyleNames property.

<ComboBox
    Width="200"
    IsEditable="True"
    IsReadOnly="True"
    Text="{Binding ElementName=textControl1, Path=InputFormat.StyleName}"
    ItemsSource="{Binding ElementName=textControl1, Path=InputFormat.StyleNames}" />

Limitations

Read only.