Skip to main content

TextPathSegmentTrimming Class

Provides a text trimming strategy that collapses overflowing text by replacing path segments with an ellipsis string.

Definition

Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public sealed class TextPathSegmentTrimming : TextTrimming
View Source
InheritanceObjectTextTrimming → TextPathSegmentTrimming

Remarks

Use this class to trim text representing file or URI paths, replacing intermediate segments with a specified ellipsis when the text exceeds the available width. This approach helps preserve the most relevant parts of the path, such as the filename or endpoint, while indicating omitted segments. The ellipsis string can be customized to match application requirements.

Constructors

TextPathSegmentTrimming(String)Initializes a new instance of the TextPathSegmentTrimming class with the specified ellipsis string to indicate trimmed text.

Methods

CreateCollapsingProperties(TextCollapsingCreateInfo)
(Overrides TextTrimming.CreateCollapsingProperties(TextCollapsingCreateInfo))
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCode()Serves as the default hash function.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()
(Overrides Object.ToString())

See Also

Reference

Avalonia.Media Namespace