Span
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class Span : Inline, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Inheritance: objectDisposableObjectRadObjectDocumentElementInlineSpan...
Derived Classes:
Implements:
Inherited Members
Constructors
Fields
public static readonly StylePropertyDefinition<BaselineAlignment?, SpanProperties> BaselineAlignmentProperty
public static readonly StylePropertyDefinition<FlowDirection?, SpanProperties> FlowDirectionProperty
public static readonly StylePropertyDefinition<FontFamily, SpanProperties> FontFamilyProperty
public static readonly StylePropertyDefinition<double?, SpanProperties> FontSizeProperty
public static readonly StylePropertyDefinition<FontStyle?, SpanProperties> FontStyleProperty
public static readonly StylePropertyDefinition<FontWeight?, SpanProperties> FontWeightProperty
public static readonly StylePropertyDefinition<Color?, SpanProperties> ForeColorProperty
public static readonly StylePropertyDefinition<Color?, SpanProperties> HighlightColorProperty
public static readonly StylePropertyDefinition<bool?, SpanProperties> StrikethroughProperty
public static readonly StylePropertyDefinition<string, SpanProperties> TagProperty
public static readonly StylePropertyDefinition<ThemeFontsEnum?, SpanProperties> ThemeFontFamilyProperty
public static readonly StylePropertyDefinition<ThemeColorsEnum?, SpanProperties> ThemeForeColorProperty
public static readonly StylePropertyDefinition<string, SpanProperties> ThemeForeColorShadeProperty
public static readonly StylePropertyDefinition<string, SpanProperties> ThemeForeColorTintProperty
public static readonly StylePropertyDefinition<ThemeColorsEnum?, SpanProperties> ThemeUnderlineColorProperty
public static readonly StylePropertyDefinition<string, SpanProperties> ThemeUnderlineColorShadeProperty
public static readonly StylePropertyDefinition<string, SpanProperties> ThemeUnderlineColorTintProperty
public static readonly StylePropertyDefinition<Color?, SpanProperties> UnderlineColorProperty
public static readonly StylePropertyDefinition<IUnderlineUIDecorationProvider, SpanProperties> UnderlineDecorationProperty
Properties
Gets or sets the baseline alignment.
[XamlSerializable]
public BaselineAlignment BaselineAlignment { get; set; }
The baseline alignment.
Gets or sets the cursor type depending on the specific element inside the span.
public override Cursor Cursor { get; set; }
An instance of Cursor determining the cursor representation.
Overrides:
Gets or sets the flow direction.
[XamlSerializable(FlowDirection.LeftToRight)]
public FlowDirection FlowDirection { get; set; }
The flow direction.
Gets or sets the font family of the content.
[XamlSerializable]
public FontFamily FontFamily { get; set; }
The font family.
Gets or sets the size of the font. The value is in Device Independent Pixels.
[XamlSerializable]
public double FontSize { get; set; }
The size of the font.
Gets or sets the font style.
[XamlSerializable]
public FontStyle FontStyle { get; set; }
The font style.
Gets or sets the font weight.
[XamlSerializable]
public FontWeight FontWeight { get; set; }
The font weight.
Gets or sets the fore color.
[XamlSerializable]
public Color ForeColor { get; set; }
The color.
Gets or sets the color of the highlight.
[XamlSerializable]
public Color HighlightColor { get; set; }
The color.
Gets or sets a value indicating whether this Span has a strike-through applied.
[XamlSerializable]
public bool Strikethrough { get; set; }
true if strike-through is applied; otherwise, false.
String property that allows developers to attach custom data to the DocumentElement. The value of this property will be copied to DocumentElements created out of this DocumentElement during editing.
[XamlSerializable("")]
public override string Tag { get; set; }
Overrides:
Gets or sets the text of the span.
[XamlSerializable]
public string Text { get; set; }
The text.
Gets or sets the theme font family.
[XamlSerializable(ThemeFontsEnum.none)]
public ThemeFontsEnum ThemeFontFamily { get; set; }
The theme font family.
Gets or sets the theme fore color.
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeForeColor { get; set; }
The color.
Gets or sets the theme fore color shade.
[XamlSerializable]
public string ThemeForeColorShade { get; set; }
The theme fore color shade.
Gets or sets the theme fore color tint.
[XamlSerializable]
public string ThemeForeColorTint { get; set; }
The theme fore color tint.
Gets or sets the theme color of the underline decoration.
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeUnderlineColor { get; set; }
The color.
Gets or sets the theme underline color shade.
[XamlSerializable]
public string ThemeUnderlineColorShade { get; set; }
The theme underline color shade.
Gets or sets the theme underline color tint.
[XamlSerializable]
public string ThemeUnderlineColorTint { get; set; }
The theme underline color tint.
Gets a value indicating whether this Span has underline applied to it.
public bool Underline { get; }
true if the content is underlined; otherwise, false.
Gets or sets the color of the underline decoration.
[XamlSerializable]
public Color UnderlineColor { get; set; }
The color.
Gets or sets the underline decoration.
[XamlSerializable]
public IUnderlineUIDecorationProvider UnderlineDecoration { get; set; }
The underline decoration.
Methods
Associates the SpanLayoutBox with a new Span.
public static bool AssociateBoxWithANewSpan(Span originalSpan, SpanLayoutBox spanLayoutBox)
The original span.
spanLayoutBoxSpanLayoutBoxThe span layout box.
Returns:true, if LayoutBox instances have been moved.
Calculates the final size of the font depending on the BaselineAlignment value.
Copies the content of a Span instance to the current object.
protected override void CopyContentFromOverride(DocumentElement fromElement)
The Span to copy the content from.
Overrides:
Creates a new span which is a copy of the contents between two positions of the current Span instance.
public override Inline CopyFromPositionToEndOfInline(DocumentPosition documentPosition, DocumentPosition endPosition)
The start position.
endPositionDocumentPositionThe end position.
Returns:A new Span instance keeping the content between the specified positions.
Overrides:
Creates a new span which is a copy of the contents between the start of the current instance and a specified end position.
public override Inline CopyFromStartOfInlineToEndPosition(DocumentPosition endPosition)
The end position.
Returns:A new Span instance keeping the contents between the start of the current instance and a specified end position.
Overrides:
Copies the properties of a Span instance to the current object.
protected override void CopyPropertiesFromOverride(DocumentElement fromElement)
The Span to copy the properties from.
Overrides:
Creates a new SpanLayoutBox instance.
public override LayoutBox CreateLayoutBox(DocumentStructureCollection documentCollection)
The document collection.
Returns:The new SpanLayoutBox instance.
Overrides:
Determines whether a Span instance has the same style applied as the current one.
public virtual bool HasSameStyle(Span other, bool compareFlowDirection = false, bool ignoreStyle = false)
The other.
compareFlowDirectionboolif set to true the FlowDirection is compared as well.
if set to true the name of the style applied to the spans is not compared.
true if the current instance and the one passed as a parameter have the same style applied; otherwise, false.