SpanLayoutBox
Represents a layout box for a span element in the Telerik document model.
Definition
Namespace:Telerik.Windows.Documents.Layout
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class SpanLayoutBox : InlineLayoutBox, INotifyPropertyChanged
Inheritance: objectLayoutElementLayoutBoxInlineLayoutBoxSpanLayoutBox
Derived Classes:
Implements:
Inherited Members
Constructors
public SpanLayoutBox(DocumentElement parentElement, DocumentStructureCollection collection, bool isFragment)
public SpanLayoutBox(DocumentElement parentElement, DocumentStructureCollection collection, string text)
public SpanLayoutBox(DocumentElement parentElement, DocumentStructureCollection collection)
Properties
Gets or sets the associated span for the SpanLayoutBox.
public Span AssociatedSpan { get; set; }
Gets the baseline offset of the span layout box, which indicates the distance from the top of the box to its baseline.
public override float BaselineOffset { get; }
Overrides:
protected override bool CanCreateLayoutBoxesFromContent { get; }
Overrides:
Gets the desired size of the text within the SpanLayoutBox.
public SizeF DesiredTextSize { get; }
Indicates whether the layout box has a defined width at the end of the line.
public override bool HasWidthAtTheEndOfLine { get; }
Overrides:
Indicates whether the span layout box is a container box.
public override bool IsContainerBox { get; }
Overrides:
Gets a value indicating whether the current SpanLayoutBox represents a decimal number.
public bool IsDecimal { get; set; }
Gets a value indicating whether the current layout box represents a paragraph symbol.
public bool IsParagraphSymbol { get; }
Gets or sets a value indicating whether the layout box is in a read-only state.
public override bool IsReadonly { get; }
Overrides:
Gets or sets a value indicating whether the span layout box can be split.
public override bool IsSplittable { get; }
true if the span layout box is splitable; otherwise, false.
Overrides:
Gets the number of positions within the layout box.
public override int PositionsCountInBox { get; }
Overrides:
Methods
Creates a layout element from the current span layout box.
public override LayoutElement CreateLayoutElement()
A new layout element that represents the span layout box.
Overrides:
Creates a new fragment with the specified height and visibility status.
public override LayoutBox CreateNewFragment(float availableWidth, bool isFirstBoxInLine)
The available width for the new fragment.
isFirstBoxInLineboolA boolean indicating whether this is the first box in the current line
Returns:A new instance of the LayoutBox class representing the created fragment.
Overrides:
Creates a new instance of SpanLayoutBox for the specified document element using the provided document structure collection and text.
public static SpanLayoutBox CreateSpanLayoutBox(DocumentElement parentElement, DocumentStructureCollection collection, string text)
The document element for which the span layout box is being created.
collectionDocumentStructureCollectionA collection of document structures related to the layout.
textstringThe text in the current SpanLayoutBox
Returns:A new instance of SpanLayoutBox representing the layout of the specified document element.
Gets the position of the layout box.
public override PositionHandler GetPositionHandler()
The position of the layout box as a PositionHandler object.
Overrides:
Invalidates the text measurement for the current SpanLayoutBox, forcing a recalculation of the text layout measurements the next time they are needed.
public void InvalidateTextMeasure()
Determines whether the current layout box marks the start of a word.
Measures the space required by the LayoutElement Used by the layout system.
protected override SizeF MeasureOverride(SizeF availableSize)
The size that is available to the LayoutElement. The available size can be infinity (to take the full size of the element)
Returns:The minimum size required by the element to be completely visible. Cannot be infinity.
Overrides:
In this method call to the Measure method of each child must be made.
protected virtual BoxMeasurementInfo MeasureTextOverride(SubStringPosition subStringPosition = 0)
Merges the current span layout box with the next layout box if applicable.
public override void MergeWithNext(LayoutBox nextSpanBox)
The layout box to merge with the current span layout box.
Overrides:
protected override void OnAssociateDocumentElementChanged()
Overrides:
Returns a string representation of the current instance of the SpanLayoutBox.
public override string ToString()
A string that represents the current SpanLayoutBox object.
Overrides:
Updates the span layout box with the specified string value.
public void Update(string text)
The string value used to update the span layout box.
Events
public event PropertyChangedEventHandler PropertyChanged
Implements: