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

Provides style-resolved character formatting values for a text span or character style.

Definition

Constructors

Initializes span properties owned by a document element.

C#
public SpanProperties(DocumentElement owner)
Parameters:ownerDocumentElement

The document element that owns these properties.

Initializes span properties owned by a character style.

C#
public SpanProperties(StyleDefinition owner)
Parameters:ownerStyleDefinition

The character style that owns these properties.

Properties

Gets or sets the text's vertical alignment relative to the baseline.

C#
[XamlSerializable]
public BaselineAlignment BaselineAlignment { get; set; }

Gets or sets the direction in which the span's text flows.

C#
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }

Gets or sets the explicit font family. Setting a different family clears ThemeFontFamily.

C#
[XamlSerializable]
public FontFamily FontFamily { get; set; }

Gets or sets the text size in device-independent pixels. Values below two points, converted to device-independent pixels, are clamped to that minimum.

C#
[XamlSerializable]
public double FontSize { get; set; }

Gets or sets the italic or normal style applied to the text.

C#
[XamlSerializable]
public FontStyle FontStyle { get; set; }

Gets or sets the weight applied to the text.

C#
[XamlSerializable]
public FontWeight FontWeight { get; set; }

Gets or sets the explicit foreground color. Setting a different color clears ThemeForeColor.

C#
[XamlSerializable]
public Color ForeColor { get; set; }

Gets or sets the background highlight color applied behind the text.

C#
[XamlSerializable]
public Color HighlightColor { get; set; }

Gets or sets whether a strike-through decoration is applied to the text.

C#
[XamlSerializable]
public bool Strikethrough { get; set; }

Gets or sets the major or minor theme font role used to resolve the font family.

C#
[XamlSerializable(ThemeFontsEnum.none)]
public ThemeFontsEnum ThemeFontFamily { get; set; }

Gets or sets the theme color role used to resolve the text foreground.

C#
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeForeColor { get; set; }

Gets or sets the serialized shade adjustment associated with the theme foreground color.

C#
[XamlSerializable]
public string ThemeForeColorShade { get; set; }

Gets or sets the serialized tint adjustment associated with the theme foreground color.

C#
[XamlSerializable]
public string ThemeForeColorTint { get; set; }

Gets or sets the theme color role used to resolve the underline color.

C#
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeUnderlineColor { get; set; }

Gets or sets the serialized shade adjustment associated with the theme underline color.

C#
[XamlSerializable]
public string ThemeUnderlineColorShade { get; set; }

Gets or sets the serialized tint adjustment associated with the theme underline color.

C#
[XamlSerializable]
public string ThemeUnderlineColorTint { get; set; }

Gets or sets the explicit underline color. Setting a different color clears ThemeUnderlineColor.

C#
[XamlSerializable]
public Color UnderlineColor { get; set; }

Gets or sets the provider that defines the underline decoration.

C#
[XamlSerializable]
public IUnderlineUIDecorationProvider UnderlineDecoration { get; set; }

Methods

Creates a span-property container associated with the current owning document element.

C#
protected override DocumentElementPropertiesBase CreateInstance()
Returns:

DocumentElementPropertiesBase

A new SpanProperties instance.

Overrides: DocumentElementPropertiesBase.CreateInstance()

Creates and registers the property instances supported by the concrete container. Called by the base constructors after the owner is assigned.

C#
protected override void InitProperties()

Overrides: DocumentElementPropertiesBase.InitProperties()

Rejects style definitions that are not character styles.

C#
protected override void ValidateStyleType(StyleDefinition value)
Parameters:valueStyleDefinition

The style definition to validate.

Exceptions: InvalidOperationException

The style is not a character style.

Overrides: DocumentElementPropertiesBase.ValidateStyleType(StyleDefinition)