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

Applies a font family to the current text selection and reports changes to the current span style.

Definition

Constructors

Initializes the command for the specified editor.

C#
public ChangeFontFamilyCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The rich text box whose text formatting this command changes.

Properties

Gets false so command execution does not explicitly return focus to the active editor.

C#
protected override bool ShouldFocusCaretAfterExecute { get; }

Overrides: RichTextBoxCommandBase.ShouldFocusCaretAfterExecute

Methods

Applies a font family supplied as a FontFamily or family-name string; legacy callers may supply a FrameworkElement whose tag contains the family name.

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

The font family or a value from which the font family can be obtained.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)

Raises the FontFamilyChanged event.

C#
protected virtual void OnFontFamilyChanged(StylePropertyChangedEventArgs<FontFamily> e)
Parameters:eStylePropertyChangedEventArgs<FontFamily>

The cached previous and newly observed font-family values.

Raises FontFamilyChanged when the observed current span font family differs from the cached value; an unset default is reported as null.

C#
protected override void UpdateSpanStyle()

Overrides: RichTextBoxCommandBase.UpdateSpanStyle()

Events

Occurs when the command detects a different font family in the current span style. An unset default is reported as null; the first event's old value can be the cache's initial null.

C#
public event EventHandler<StylePropertyChangedEventArgs<FontFamily>> FontFamilyChanged