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

Reads formatting values from an editor's current span and paragraph styles for UI controls.

Nullable results use null when the corresponding property source is Default.

Definition

Namespace:Telerik.WinControls.RichTextEditor.UI

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class StyleUIHelper

Inheritance: objectStyleUIHelper

Constructors

Initializes the helper from the editor's current styles and document.

C#
public StyleUIHelper(RadRichTextBox owner)
Parameters:ownerRadRichTextBox

The editor whose current styles and document are read; this value must not be null.

Methods

Gets the captured span's baseline alignment, or null when its property source is Default.

C#
public BaselineAlignment? GetBaselineAlignment()
Returns:

BaselineAlignment?

Gets the captured span's font family, or null when its property source is default.

C#
public FontFamily GetFontFamilyOfSpanStyle()
Returns:

FontFamily

Gets the captured span's font size, or null when its property source is Default.

C#
public double? GetFontSizeOfSpanStyle()
Returns:

double?

Gets the captured span's font style, except that the result is null when its font-weight property source is default.

C#
public FontStyle? GetFontStyleOfSpanStyle()
Returns:

FontStyle?

The default-source check uses FontWeightProperty rather than FontStyleProperty.

Gets the captured span's font weight, or null when its property source is Default.

C#
public FontWeight? GetFontWeightOfSpanStyle()
Returns:

FontWeight?

Gets the captured span's foreground color, or null when its property source is Default.

C#
public Color? GetForeColorOfSpanStyle()
Returns:

Color?

Gets the captured span's highlight color, or null when its property source is Default.

C#
public Color? GetHighlightColorOfSpanStyle()
Returns:

Color?

Reports whether the captured paragraph style belongs to a bulleted list in the associated document.

C#
public bool GetIsBulleted()
Returns:

bool

Reports whether the captured paragraph style belongs to a numbered list in the associated document.

C#
public bool GetIsNumbered()
Returns:

bool

Attempts to get the captured paragraph's flow direction, but currently queries an unregistered span property and throws NullReferenceException.

C#
public FlowDirection? GetParagraphTextFlowDirection()
Returns:

FlowDirection?

Exceptions: NullReferenceException

The paragraph style does not register FlowDirectionProperty.

Gets the captured span's strike-through setting, or null when its property source is Default.

C#
public bool? GetStrikeThroughOfSpanStyle()
Returns:

bool?

Gets the captured paragraph's text alignment, or null when its property source is Default.

C#
public RadTextAlignment? GetTextAlignmentOfParagraphStyle()
Returns:

RadTextAlignment?

Gets whether the captured span is underlined, or null when its underline-decoration source is Default.

C#
public bool? GetUnderline()
Returns:

bool?

Gets the captured span's underline-decoration provider, or null when its property source is Default.

C#
public IUnderlineUIDecorationProvider GetUnderlineDecoration()
Returns:

IUnderlineUIDecorationProvider