Skip to main content

TextPathSegmentEllipsis Class

Definition

Namespace:Avalonia.Media
Assembly:Avalonia.Base
Package:Avalonia

Provides text collapsing properties that replace the middle segments of a file path with an ellipsis symbol when the rendered width exceeds a specified limit.

public class TextPathSegmentEllipsis

Inheritance: object -> TextCollapsingProperties -> TextPathSegmentEllipsis

Remarks

This class is typically used to display file paths in a compact form by collapsing segments near the center and inserting an ellipsis, ensuring that the most significant parts of the path remain visible.

Constructors

NameDescription
TextPathSegmentEllipsisInitializes a new instance of the TextPathSegmentEllipsis class that represents an ellipsis segment in a text path with the specified symbol, width, text formatting properties, and flow direction.

TextPathSegmentEllipsis Constructor

Initializes a new instance of the TextPathSegmentEllipsis class that represents an ellipsis segment in a text path with the specified symbol, width, text formatting properties, and flow direction.

public TextPathSegmentEllipsis(string ellipsis, double width, Avalonia.Media.TextFormatting.TextRunProperties textRunProperties, Avalonia.Media.FlowDirection flowDirection)

Parameters

ellipsis string

The string to use as the ellipsis symbol in the text path segment. Cannot be null.

width double

The width.

textRunProperties Avalonia.Media.TextFormatting.TextRunProperties

The text formatting properties to apply to the ellipsis symbol. Cannot be null.

flowDirection Avalonia.Media.FlowDirection

The flow direction for rendering the ellipsis segment. Specifies whether text flows left-to-right or right-to-left.

Methods

NameDescription
CollapseNo summary available.
CreateCollapsedRunsCreates a list of runs for given collapsed length which includes specified symbol at the end. Inherited from TextCollapsingProperties.

Collapse Method

public Avalonia.Media.TextFormatting.TextRun[] Collapse(Avalonia.Media.TextFormatting.TextLine textLine)

Parameters

textLine Avalonia.Media.TextFormatting.TextLine

Returns

Avalonia.Media.TextFormatting.TextRun[]

Properties

NameDescription
FlowDirectionNo summary available.
SymbolNo summary available.
WidthNo summary available.

FlowDirection Property

public Avalonia.Media.FlowDirection FlowDirection { get; set; }

Symbol Property

public Avalonia.Media.TextFormatting.TextRun Symbol { get; set; }

Width Property

public double Width { get; set; }