Class
SpanProperties

Represents the properties associated with a span element in a document, including formatting and styling.

Definition

Namespace:Telerik.Windows.Documents.Model.Styles

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class SpanProperties : DocumentElementPropertiesBase, IElementWithStyle

Inheritance: objectDocumentElementPropertiesBaseSpanProperties

Implements: IElementWithStyle

Inherited Members DocumentElementPropertiesBase.GetStyleProperty(IStylePropertyDefinition)DocumentElementPropertiesBase.GetStyleProperty(string)DocumentElementPropertiesBase.CopyPropertiesFrom(DocumentElementPropertiesBase)DocumentElementPropertiesBase.MergePropertiesWith(DocumentElementPropertiesBase)DocumentElementPropertiesBase.ToString()DocumentElementPropertiesBase.ClearProperties()DocumentElementPropertiesBase.OnStylePropertyChangedOverride(StylePropertyChangeEventArgs)DocumentElementPropertiesBase.OnStyleChanged()DocumentElementPropertiesBase.OnStyleChanging()DocumentElementPropertiesBase.StylePropertiesDocumentElementPropertiesBase.StyleNameDocumentElementPropertiesBase.OriginalStyleNameDocumentElementPropertiesBase.StyleDocumentElementPropertiesBase.HasRevisionsDocumentElementPropertiesBase.RevisionInfoDocumentElementPropertiesBase.OriginalProperties

Constructors

SpanProperties(DocumentElement)

Declaration

cs-api-definition
public SpanProperties(DocumentElement owner)

Parameters

owner

DocumentElement

SpanProperties(StyleDefinition)

Declaration

cs-api-definition
public SpanProperties(StyleDefinition owner)

Parameters

owner

StyleDefinition

Properties

BaselineAlignment

Gets or sets the baseline alignment of the span element. This property determines how the text within the span aligns with respect to the baseline.

Declaration

cs-api-definition
[XamlSerializable]
public BaselineAlignment BaselineAlignment { get; set; }

Property Value

BaselineAlignment

Gets or sets a value representing the baseline alignment.

FlowDirection

Gets or sets the flow direction of the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }

Property Value

FlowDirection

A value that specifies the flow direction, which can influence the layout and rendering of text within the span.

FontFamily

Gets or sets the font family for the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public FontFamily FontFamily { get; set; }

Property Value

FontFamily

A string representing the font family name.

FontSize

Gets or sets the size of the font for the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public double FontSize { get; set; }

Property Value

double

A double representing the size of the font.

FontStyle

Gets or sets the font style of the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public FontStyle FontStyle { get; set; }

Property Value

FontStyle

A value of the FontStyle enumeration that specifies the font style applied to the text within the span.

FontWeight

Gets or sets the weight of the font used in the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public FontWeight FontWeight { get; set; }

Property Value

FontWeight

A value of type FontWeight that specifies the font weight.

ForeColor

Gets or sets the foreground color of the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public Color ForeColor { get; set; }

Property Value

Color

The color of the foreground as a Color object.

HighlightColor

Gets or sets the highlight color of the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public Color HighlightColor { get; set; }

Property Value

Color

The highlight color applied to the span. This property allows for the customization of the span's background color to enhance text visibility.

Strikethrough

Gets or sets a value indicating whether the text in the span is displayed with a strikethrough effect.

Declaration

cs-api-definition
[XamlSerializable]
public bool Strikethrough { get; set; }

Property Value

bool

A boolean value where true indicates that the text has a strikethrough, and false indicates it does not.

ThemeFontFamily

Gets or sets the theme font family for the span properties.

Declaration

cs-api-definition
[XamlSerializable(ThemeFontsEnum.none)]
public ThemeFontsEnum ThemeFontFamily { get; set; }

Property Value

ThemeFontsEnum

The theme font family associated with the span.

ThemeForeColor

Gets or sets the theme foreground color of the span properties.

Declaration

cs-api-definition
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeForeColor { get; set; }

Property Value

ThemeColorsEnum

The theme foreground color that is applied to the span.

ThemeForeColorShade

Gets or sets the shade of the theme foreground color for the SpanProperties.

Declaration

cs-api-definition
[XamlSerializable]
public string ThemeForeColorShade { get; set; }

Property Value

string

A value representing the shade of the theme foreground color. This property allows for customization of the foreground color implementation in document styles.

ThemeForeColorTint

Gets or sets the tint of the theme foreground color for the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public string ThemeForeColorTint { get; set; }

Property Value

string

A double value representing the tint of the theme foreground color. A value of 0 indicates no tint, while values greater than 0 apply a tint effect.

ThemeUnderlineColor

Gets or sets the theme color applied to the underline of the text within the span properties.

Declaration

cs-api-definition
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeUnderlineColor { get; set; }

Property Value

ThemeColorsEnum

A Color representing the theme underline color. Returns the current theme underline color or a default value if none is set.

ThemeUnderlineColorShade

Gets or sets the shade of the underline color for the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public string ThemeUnderlineColorShade { get; set; }

Property Value

string

A color shade that represents the underline color for the text in the span.

ThemeUnderlineColorTint

Gets or sets the tint of the underline color for the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public string ThemeUnderlineColorTint { get; set; }

Property Value

string

A float representing the tint of the underline color. The tint modifies the base color's intensity, with values ranging from -1 to 1.

UnderlineColor

Gets or sets the color of the underline for the span properties.

Declaration

cs-api-definition
[XamlSerializable]
public Color UnderlineColor { get; set; }

Property Value

Color

A Color value representing the color of the underline.

UnderlineDecoration

Gets or sets the underline decoration for the text span properties.

Declaration

cs-api-definition
[XamlSerializable]
public IUnderlineUIDecorationProvider UnderlineDecoration { get; set; }

Property Value

IUnderlineUIDecorationProvider

Methods

CreateInstance()

Declaration

cs-api-definition
protected override DocumentElementPropertiesBase CreateInstance()

Returns

DocumentElementPropertiesBase

Overrides DocumentElementPropertiesBase.CreateInstance()

InitProperties()

Declaration

cs-api-definition
protected override void InitProperties()

Overrides DocumentElementPropertiesBase.InitProperties()

ValidateStyleType(StyleDefinition)

Declaration

cs-api-definition
protected override void ValidateStyleType(StyleDefinition value)

Parameters

value

StyleDefinition

Overrides DocumentElementPropertiesBase.ValidateStyleType(StyleDefinition)