TXTextControl.InputFormat.StyleName Property

Gets or sets the formatting style name at the current input position. If text is selected, the property specifies the style of the whole selected text.

Syntax

[C#]
public string StyleName { get; set; }
[Visual Basic]
Public Property StyleName() As String

Remarks

The property returns null when the text selection contains multiple characters with different styles.

Example

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}" />

See Also