Table of Contents

Class TextTrimming

Namespace
Avalonia.Media
Assembly
Avalonia.Base.dll

Describes how text is trimmed when it overflows.

public abstract class TextTrimming
Inheritance
TextTrimming
Derived
Inherited Members

Constructors

TextTrimming()

protected TextTrimming()

Properties

CharacterEllipsis

Text is trimmed at a character boundary. An ellipsis (...) is drawn in place of remaining text.

public static TextTrimming CharacterEllipsis { get; }

Property Value

TextTrimming

LeadingCharacterEllipsis

Text is trimmed at a character boundary starting from the beginning. An ellipsis (...) is drawn in place of remaining text.

public static TextTrimming LeadingCharacterEllipsis { get; }

Property Value

TextTrimming

None

Text is not trimmed.

public static TextTrimming None { get; }

Property Value

TextTrimming

PrefixCharacterEllipsis

Text is trimmed after a given prefix length. An ellipsis (...) is drawn in between prefix and suffix and represents remaining text.

public static TextTrimming PrefixCharacterEllipsis { get; }

Property Value

TextTrimming

WordEllipsis

Text is trimmed at a word boundary. An ellipsis (...) is drawn in place of remaining text.

public static TextTrimming WordEllipsis { get; }

Property Value

TextTrimming

Methods

CreateCollapsingProperties(TextCollapsingCreateInfo)

Creates properties that will be used for collapsing lines of text.

public abstract TextCollapsingProperties CreateCollapsingProperties(TextCollapsingCreateInfo createInfo)

Parameters

createInfo TextCollapsingCreateInfo

Contextual info about text that will be collapsed.

Returns

TextCollapsingProperties

Parse(string)

Parses a text trimming string. Names must match static properties defined in this class.

public static TextTrimming Parse(string s)

Parameters

s string

The text trimming string.

Returns

TextTrimming

The TextTrimming.