Class Span
Inherited Members
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Documents.dll
Syntax
public class Span : Inline
Constructors
Span()
Span(String)
Initializes a new instance of the Span class with applied text.
Declaration
public Span(string text)
Parameters
System.String
text
The text content of the span. |
Span(Span)
Fields
BaselineAlignmentProperty
Declaration
public static readonly StylePropertyDefinition<BaselineAlignment? , SpanProperties> BaselineAlignmentProperty
Field Value
StylePropertyDefinition<System.Nullable<BaselineAlignment>, SpanProperties>
|
FlowDirectionProperty
Declaration
public static readonly StylePropertyDefinition<FlowDirection? , SpanProperties> FlowDirectionProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.FlowDirection>, SpanProperties>
|
FontFamilyProperty
Declaration
public static readonly StylePropertyDefinition<FontFamily, SpanProperties> FontFamilyProperty
Field Value
StylePropertyDefinition<System.Windows.Media.FontFamily, SpanProperties>
|
FontSizeProperty
Declaration
public static readonly StylePropertyDefinition<double? , SpanProperties> FontSizeProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Double>, SpanProperties>
|
FontStyleProperty
Declaration
public static readonly StylePropertyDefinition<FontStyle? , SpanProperties> FontStyleProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.FontStyle>, SpanProperties>
|
FontWeightProperty
Declaration
public static readonly StylePropertyDefinition<FontWeight? , SpanProperties> FontWeightProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.FontWeight>, SpanProperties>
|
ForeColorProperty
Declaration
public static readonly StylePropertyDefinition<Color? , SpanProperties> ForeColorProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.Media.Color>, SpanProperties>
|
HighlightColorProperty
Declaration
public static readonly StylePropertyDefinition<Color? , SpanProperties> HighlightColorProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.Media.Color>, SpanProperties>
|
StrikethroughProperty
Declaration
public static readonly StylePropertyDefinition<bool? , SpanProperties> StrikethroughProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Boolean>, SpanProperties>
|
TagProperty
Declaration
public static readonly StylePropertyDefinition<string, SpanProperties> TagProperty
Field Value
StylePropertyDefinition<System.String, SpanProperties>
|
ThemeFontFamilyProperty
Declaration
public static readonly StylePropertyDefinition<ThemeFontsEnum? , SpanProperties> ThemeFontFamilyProperty
Field Value
StylePropertyDefinition<System.Nullable<ThemeFontsEnum>, SpanProperties>
|
ThemeForeColorProperty
Declaration
public static readonly StylePropertyDefinition<ThemeColorsEnum? , SpanProperties> ThemeForeColorProperty
Field Value
StylePropertyDefinition<System.Nullable<ThemeColorsEnum>, SpanProperties>
|
ThemeForeColorShadeProperty
Declaration
public static readonly StylePropertyDefinition<string, SpanProperties> ThemeForeColorShadeProperty
Field Value
StylePropertyDefinition<System.String, SpanProperties>
|
ThemeForeColorTintProperty
Declaration
public static readonly StylePropertyDefinition<string, SpanProperties> ThemeForeColorTintProperty
Field Value
StylePropertyDefinition<System.String, SpanProperties>
|
ThemeUnderlineColorProperty
Declaration
public static readonly StylePropertyDefinition<ThemeColorsEnum? , SpanProperties> ThemeUnderlineColorProperty
Field Value
StylePropertyDefinition<System.Nullable<ThemeColorsEnum>, SpanProperties>
|
ThemeUnderlineColorShadeProperty
Declaration
public static readonly StylePropertyDefinition<string, SpanProperties> ThemeUnderlineColorShadeProperty
Field Value
StylePropertyDefinition<System.String, SpanProperties>
|
ThemeUnderlineColorTintProperty
Declaration
public static readonly StylePropertyDefinition<string, SpanProperties> ThemeUnderlineColorTintProperty
Field Value
StylePropertyDefinition<System.String, SpanProperties>
|
UnderlineColorProperty
Declaration
public static readonly StylePropertyDefinition<Color? , SpanProperties> UnderlineColorProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.Media.Color>, SpanProperties>
|
UnderlineDecorationProperty
Declaration
public static readonly StylePropertyDefinition<IUnderlineUIDecorationProvider, SpanProperties> UnderlineDecorationProperty
Field Value
StylePropertyDefinition<IUnderlineUIDecorationProvider, SpanProperties>
|
Properties
BaselineAlignment
Gets or sets the baseline alignment.
Declaration
[XamlSerializable]
public BaselineAlignment BaselineAlignment { get; set; }
Property Value
BaselineAlignment
The baseline alignment. |
Cursor
Gets or sets the cursor type depending on the specific element inside the span.
Declaration
public override Cursor Cursor { get; set; }
Property Value
System.Windows.Input.Cursor
An instance of Cursor determining the cursor representation. |
Overrides
FlowDirection
Gets or sets the flow direction.
Declaration
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }
Property Value
System.Windows.FlowDirection
The flow direction. |
FontFamily
Gets or sets the font family of the content.
Declaration
[XamlSerializable]
public FontFamily FontFamily { get; set; }
Property Value
System.Windows.Media.FontFamily
The font family. |
FontSize
Gets or sets the size of the font. The value is in Device Independent Pixels.
Declaration
[XamlSerializable]
public double FontSize { get; set; }
Property Value
System.Double
The size of the font. |
FontStyle
Gets or sets the font style.
Declaration
[XamlSerializable]
public FontStyle FontStyle { get; set; }
Property Value
System.Windows.FontStyle
The font style. |
FontWeight
Gets or sets the font weight.
Declaration
[XamlSerializable]
public FontWeight FontWeight { get; set; }
Property Value
System.Windows.FontWeight
The font weight. |
ForeColor
Gets or sets the fore color.
Declaration
[XamlSerializable]
public Color ForeColor { get; set; }
Property Value
System.Windows.Media.Color
The color. |
HighlightColor
Gets or sets the color of the highlight.
Declaration
[XamlSerializable]
public Color HighlightColor { get; set; }
Property Value
System.Windows.Media.Color
The color. |
Strikethrough
Gets or sets a value indicating whether this Span has a strike-through applied.
Declaration
[XamlSerializable]
public bool Strikethrough { get; set; }
Property Value
System.Boolean
|
Tag
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.
Declaration
[XamlSerializable("")]
public override string Tag { get; set; }
Property Value
System.String
|
Overrides
Text
Gets or sets the text of the span.
Declaration
[XamlSerializable]
public string Text { get; set; }
Property Value
System.String
The text. |
ThemeFontFamily
Gets or sets the theme font family.
Declaration
[XamlSerializable(ThemeFontsEnum.none)]
public ThemeFontsEnum ThemeFontFamily { get; set; }
Property Value
ThemeFontsEnum
The theme font family. |
ThemeForeColor
Gets or sets the theme fore color.
Declaration
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeForeColor { get; set; }
Property Value
ThemeColorsEnum
The color. |
ThemeForeColorShade
Gets or sets the theme fore color shade.
Declaration
[XamlSerializable]
public string ThemeForeColorShade { get; set; }
Property Value
System.String
The theme fore color shade. |
ThemeForeColorTint
Gets or sets the theme fore color tint.
Declaration
[XamlSerializable]
public string ThemeForeColorTint { get; set; }
Property Value
System.String
The theme fore color tint. |
ThemeUnderlineColor
Gets or sets the theme color of the underline decoration.
Declaration
[XamlSerializable(ThemeColorsEnum.none)]
public ThemeColorsEnum ThemeUnderlineColor { get; set; }
Property Value
ThemeColorsEnum
The color. |
ThemeUnderlineColorShade
Gets or sets the theme underline color shade.
Declaration
[XamlSerializable]
public string ThemeUnderlineColorShade { get; set; }
Property Value
System.String
The theme underline color shade. |
ThemeUnderlineColorTint
Gets or sets the theme underline color tint.
Declaration
[XamlSerializable]
public string ThemeUnderlineColorTint { get; set; }
Property Value
System.String
The theme underline color tint. |
Underline
Gets a value indicating whether this Span has underline applied to it.
Declaration
public bool Underline { get; }
Property Value
System.Boolean
|
UnderlineColor
Gets or sets the color of the underline decoration.
Declaration
[XamlSerializable]
public Color UnderlineColor { get; set; }
Property Value
System.Windows.Media.Color
The color. |
UnderlineDecoration
Gets or sets the underline decoration.
Declaration
[XamlSerializable]
public IUnderlineUIDecorationProvider UnderlineDecoration { get; set; }
Property Value
IUnderlineUIDecorationProvider
The underline decoration. |
Methods
AssociateBoxWithANewSpan(Span, SpanLayoutBox)
Associates the SpanLayoutBox with a new Span.
Declaration
public static bool AssociateBoxWithANewSpan(Span originalSpan, SpanLayoutBox spanLayoutBox)
Parameters
Span
originalSpan
The original span. |
SpanLayoutBox
spanLayoutBox
The span layout box. |
Returns
System.Boolean
|
CalculateFinalFontSize()
Calculates the final size of the font depending on the BaselineAlignment value.
Declaration
public double CalculateFinalFontSize()
Returns
System.Double
The calculated font size. |
CopyContentFromOverride(DocumentElement)
Copies the content of a Span instance to the current object.
Declaration
protected override void CopyContentFromOverride(DocumentElement fromElement)
Parameters
DocumentElement
fromElement
The Span to copy the content from. |
Overrides
CopyFromPositionToEndOfInline(DocumentPosition, DocumentPosition)
Creates a new span which is a copy of the contents between two positions of the current Span instance.
Declaration
public override Inline CopyFromPositionToEndOfInline(DocumentPosition documentPosition, DocumentPosition endPosition)
Parameters
DocumentPosition
documentPosition
The start position. |
DocumentPosition
endPosition
The end position. |
Returns
Inline
A new Span instance keeping the content between the specified positions. |
Overrides
CopyFromStartOfInlineToEndPosition(DocumentPosition)
Creates a new span which is a copy of the contents between the start of the current instance and a specified end position.
Declaration
public override Inline CopyFromStartOfInlineToEndPosition(DocumentPosition endPosition)
Parameters
DocumentPosition
endPosition
The end position. |
Returns
Inline
A new Span instance keeping the contents between the start of the current instance and a specified end position. |
Overrides
CopyPropertiesFromOverride(DocumentElement)
Copies the properties of a Span instance to the current object.
Declaration
protected override void CopyPropertiesFromOverride(DocumentElement fromElement)
Parameters
DocumentElement
fromElement
The Span to copy the properties from. |
Overrides
CreateLayoutBox(DocumentStructureCollection)
Creates a new SpanLayoutBox instance.
Declaration
public override LayoutBox CreateLayoutBox(DocumentStructureCollection documentCollection)
Parameters
DocumentStructureCollection
documentCollection
The document collection. |
Returns
LayoutBox
The new SpanLayoutBox instance. |
Overrides
CreateNewElementInstance()
Creates a new Span instance.
Declaration
protected override DocumentElement CreateNewElementInstance()
Returns
DocumentElement
The new Span instance. |
Overrides
HasSameStyle(Span, Boolean, Boolean)
Determines whether a Span instance has the same style applied as the current one.
Declaration
public virtual bool HasSameStyle(Span other, bool compareFlowDirection = false, bool ignoreStyle = false)
Parameters
Span
other
The other. |
System.Boolean
compareFlowDirection
if set to |
System.Boolean
ignoreStyle
if set to |
Returns
System.Boolean
|