TextTrimming Class
Definition
Describes how text is trimmed when it overflows.
public class TextTrimming
Methods
| Name | Description |
|---|---|
| CreateCollapsingProperties | Creates properties that will be used for collapsing lines of text. |
| Parse | Parses a text trimming string. Names must match static properties defined in this class. |
CreateCollapsingProperties Method
Creates properties that will be used for collapsing lines of text.
public Avalonia.Media.TextFormatting.TextCollapsingProperties CreateCollapsingProperties(Avalonia.Media.TextCollapsingCreateInfo createInfo)
Parameters
createInfo Avalonia.Media.TextCollapsingCreateInfo
Contextual info about text that will be collapsed.
Returns
Parse Method
Parses a text trimming string. Names must match static properties defined in this class.
public Avalonia.Media.TextTrimming Parse(string s)
Parameters
s string
The text trimming string.
Returns
Properties
| Name | Description |
|---|---|
| CharacterEllipsis | Text is trimmed at a character boundary. An ellipsis (...) is drawn in place of remaining text. |
| LeadingCharacterEllipsis | Text is trimmed at a character boundary starting from the beginning. An ellipsis (...) is drawn in place of remaining text. |
| None | Text is not trimmed. |
| PathSegmentEllipsis | Gets a text trimming strategy that inserts an ellipsis to indicate omitted segments in a path string. |
| PrefixCharacterEllipsis | Text is trimmed after a given prefix length. An ellipsis (...) is drawn in between prefix and suffix and represents remaining text. |
| WordEllipsis | Text is trimmed at a word boundary. An ellipsis (...) is drawn in place of remaining text. |
CharacterEllipsis Property
Text is trimmed at a character boundary. An ellipsis (...) is drawn in place of remaining text.
public Avalonia.Media.TextTrimming CharacterEllipsis { get; set; }
LeadingCharacterEllipsis Property
Text is trimmed at a character boundary starting from the beginning. An ellipsis (...) is drawn in place of remaining text.
public Avalonia.Media.TextTrimming LeadingCharacterEllipsis { get; set; }
None Property
Text is not trimmed.
public Avalonia.Media.TextTrimming None { get; set; }
PathSegmentEllipsis Property
Gets a text trimming strategy that inserts an ellipsis to indicate omitted segments in a path string.
public Avalonia.Media.TextTrimming PathSegmentEllipsis { get; set; }
Remarks
Use this property to display long file or directory paths in a shortened form, with an ellipsis representing omitted segments. This is useful for UI scenarios where space is limited and the full path cannot be shown.
PrefixCharacterEllipsis Property
Text is trimmed after a given prefix length. An ellipsis (...) is drawn in between prefix and suffix and represents remaining text.
public Avalonia.Media.TextTrimming PrefixCharacterEllipsis { get; set; }
WordEllipsis Property
Text is trimmed at a word boundary. An ellipsis (...) is drawn in place of remaining text.
public Avalonia.Media.TextTrimming WordEllipsis { get; set; }