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

Passes a named style to the editor for the selection or clears style assignments when the parameter is null.

Definition

Constructors

Creates the style-name command for the specified editor.

C#
public ChangeStyleNameCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The editor whose current selection receives the style change.

Methods

Passes a string style name to the editor or clears style assignments when parameter is null.

C#
protected override void ExecuteOverride(object parameter)
Parameters:parameterobject

A style name or null. Other types are ignored; the editor may use a linked style based on the selection.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)

Raises StyleNameChanged with the previous and current style names.

C#
protected virtual void OnStyleNameChanged(StylePropertyChangedEventArgs<string> e)
Parameters:eStylePropertyChangedEventArgs<string>

The old and new style names.

Raises StyleNameChanged when the current span's style name changes.

C#
protected override void UpdateSpanStyle()

Overrides: RichTextBoxCommandBase.UpdateSpanStyle()

Events

Occurs when the command observes a change in the current span's style name.

C#
public event EventHandler<StylePropertyChangedEventArgs<string>> StyleNameChanged