SpanProperties
Provides style-resolved character formatting values for a text span or character style.
Definition
Namespace:Telerik.WinForms.Documents.Model.Styles
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class SpanProperties : DocumentElementPropertiesBase, IElementWithStyle
Inheritance: objectDocumentElementPropertiesBaseSpanProperties
Implements:
Inherited Members
Constructors
Initializes span properties owned by a document element.
public SpanProperties(DocumentElement owner)
The document element that owns these properties.
Initializes span properties owned by a character style.
public SpanProperties(StyleDefinition owner)
The character style that owns these properties.
Properties
Gets or sets the text's vertical alignment relative to the baseline.
[XamlSerializable]
public BaselineAlignment BaselineAlignment { get; set; }
Gets or sets the direction in which the span's text flows.
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }
Gets or sets the explicit font family. Setting a different family clears ThemeFontFamily.
[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.
[XamlSerializable]
public double FontSize { get; set; }
Gets or sets the italic or normal style applied to the text.
[XamlSerializable]
public FontStyle FontStyle { get; set; }
Gets or sets the weight applied to the text.
[XamlSerializable]
public FontWeight FontWeight { get; set; }
Gets or sets the explicit foreground color. Setting a different color clears ThemeForeColor.
[XamlSerializable]
public Color ForeColor { get; set; }
Gets or sets the background highlight color applied behind the text.
[XamlSerializable]
public Color HighlightColor { get; set; }
Gets or sets whether a strike-through decoration is applied to the text.
[XamlSerializable]
public bool Strikethrough { get; set; }
Gets or sets the major or minor theme font role used to resolve the font family.
[XamlSerializable(ThemeFontsEnum.none)]
public ThemeFontsEnum ThemeFontFamily { get; set; }
Gets or sets the theme color role used to resolve the text foreground.
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeForeColor { get; set; }
Gets or sets the serialized shade adjustment associated with the theme foreground color.
[XamlSerializable]
public string ThemeForeColorShade { get; set; }
Gets or sets the serialized tint adjustment associated with the theme foreground color.
[XamlSerializable]
public string ThemeForeColorTint { get; set; }
Gets or sets the theme color role used to resolve the underline color.
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeUnderlineColor { get; set; }
Gets or sets the serialized shade adjustment associated with the theme underline color.
[XamlSerializable]
public string ThemeUnderlineColorShade { get; set; }
Gets or sets the serialized tint adjustment associated with the theme underline color.
[XamlSerializable]
public string ThemeUnderlineColorTint { get; set; }
Gets or sets the explicit underline color. Setting a different color clears ThemeUnderlineColor.
[XamlSerializable]
public Color UnderlineColor { get; set; }
Gets or sets the provider that defines the underline decoration.
[XamlSerializable]
public IUnderlineUIDecorationProvider UnderlineDecoration { get; set; }
Methods
Creates a span-property container associated with the current owning document element.
protected override DocumentElementPropertiesBase CreateInstance()
A new SpanProperties instance.
Overrides:
Creates and registers the property instances supported by the concrete container. Called by the base constructors after the owner is assigned.
protected override void InitProperties()
Overrides:
Rejects style definitions that are not character styles.
protected override void ValidateStyleType(StyleDefinition value)
The style definition to validate.
Exceptions: InvalidOperationExceptionThe style is not a character style.
Overrides: