Property StackSeparators
StackSeparators
Gets a collection of stack separators that should be used for automatic line breaking of label text.
Declaration
public IList<LabelStackSeparator> StackSeparators { get; }
Property Value
Type | Description |
---|---|
IList<LabelStackSeparator> | A collection of stack separators that should be used for automatic line breaking of label text. |
Remarks
Each LabelStackSeparator specifies a code point to be looked for in the text. A code point is often thought of as a single character in the text, but may need several chars in a System.String to describe it. So each Separator is a System.String intended to describe one code point.
For example:
- To use a comma as a separator, the Separator string would be just ",".
-
To use a Hebrew punctuation Paseq as a separator, the Separator
would need to encode the code point with utf16 value
\u05c0
. -
To use higher range unicode code points such as Aegean Word Separator Dot which has utf32 hex
value 10101, the Separator would need to encode the code point
with utf16 value
\ud800\udd01
.
If it is found, then the LabelStackSeparator also specifies whether:
- The text should always be broken here.
- Whether the separator code point should remain visible.
- Whether the separator code point should appear at the end of one row, or the beginning of the next.
Three default separators are provided: a comma, a space, and a hyphen. Custom separators can be added, and default separators can be removed if not required.
Note that a carriage-return (\n) in the label will always be considered a forced separator.
This property has no effect if StackStrategy = None.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.11 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.11 - 100.15 |
.NET 5 | 100.11 - 100.12 |
.NET Core 3.1 | 100.11 - 100.12 |
Xamarin.Android | 100.11 - 100.15 |
Xamarin.iOS | 100.11 - 100.15 |
UWP | 100.11 - 100.15 |