TextTrailingCharacterEllipsis Class
Definition
A collapsing properties to collapse whole line toward the end at character granularity.
public class TextTrailingCharacterEllipsis
Constructors
| Name | Description |
|---|---|
| TextTrailingCharacterEllipsis | Construct a text trailing character ellipsis collapsing properties |
TextTrailingCharacterEllipsis Constructor
Construct a text trailing character ellipsis collapsing properties
public TextTrailingCharacterEllipsis(string ellipsis, double width, Avalonia.Media.TextFormatting.TextRunProperties textRunProperties, Avalonia.Media.FlowDirection flowDirection)
Parameters
ellipsis string
Text used as collapsing symbol.
width double
Width in which collapsing is constrained to.
textRunProperties Avalonia.Media.TextFormatting.TextRunProperties
Text run properties of ellipsis symbol.
flowDirection Avalonia.Media.FlowDirection
The flow direction of the collapsed line.
Methods
| Name | Description |
|---|---|
| Collapse | Collapses the given text line and returns the resulting runs, or if no collapse is needed (the consumer then keeps the original line unchanged). |
| CreateCollapsedRuns | Creates a list of runs for given collapsed length which includes specified symbol at the end. Inherited from TextCollapsingProperties. |
Collapse Method
Collapses the given text line and returns the resulting runs, or if no collapse is needed (the consumer then keeps the original line unchanged).
public Avalonia.Media.TextFormatting.TextRun[] Collapse(Avalonia.Media.TextFormatting.TextLine textLine)
Parameters
textLine Avalonia.Media.TextFormatting.TextLine
Text line to collapse.
Returns
Avalonia.Media.TextFormatting.TextRun[]
Remarks
Implementations MUST return runs in logical order. The
consumer (TextLineImpl.Collapse) wraps the returned array
in a new Avalonia.Media.TextFormatting.TextLine and re-runs the BiDi reorderer
via FinalizeLine, so pre-applying visual order here would
be reordered a second time and produce garbled output on RTL or
mixed-bidi lines.
Iterate the source line's runs via
LogicalTextRunEnumerator, not Avalonia.Media.TextFormatting.TextLine.TextRuns
(which is post-bidi visual order). Use
Avalonia.Media.TextFormatting.TextCollapsingProperties.CreateCollapsedRuns(Avalonia.Media.TextFormatting.TextLine,int,Avalonia.Media.TextFormatting.TextRun) when an implementation only
needs the standard "logical prefix + symbol" shape.
Properties
| Name | Description |
|---|---|
| FlowDirection | No summary available. |
| Symbol | Gets the text run that is used as collapsing symbol. |
| Width | Gets the width in which the collapsible range is constrained to. |
FlowDirection Property
public Avalonia.Media.FlowDirection FlowDirection { get; set; }
Symbol Property
Gets the text run that is used as collapsing symbol.
public Avalonia.Media.TextFormatting.TextRun Symbol { get; set; }
Width Property
Gets the width in which the collapsible range is constrained to.
public double Width { get; set; }