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

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

Definition

Constructors

Initializes the command for the specified editor.

C#
public ChangeFontSizeCommand(RadRichTextBox editor)
Parameters:editorRadRichTextBox

The rich text box whose text formatting this command changes.

Methods

Applies a positive font size supplied as a number or as a string parseable using the invariant or current culture.

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

The font size as a double or a parseable string.

Overrides: RichTextBoxCommandBase.ExecuteOverride(object)

Raises the FontSizeChanged event.

C#
protected virtual void OnFontSizeChanged(StylePropertyChangedEventArgs<double> e)
Parameters:eStylePropertyChangedEventArgs<double>

The cached previous and newly observed font-size values.

Raises FontSizeChanged when the observed current span font size differs from the cached value; an unset default is reported as MaxValue.

C#
protected override void UpdateSpanStyle()

Overrides: RichTextBoxCommandBase.UpdateSpanStyle()

Events

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

C#
public event EventHandler<StylePropertyChangedEventArgs<double>> FontSizeChanged