Method ClipAndJustify
ClipAndJustify(string, int, Alignment, TextDirection, int, TextFormatter?)
Justifies text within a specified width.
public static string ClipAndJustify(string text, int width, Alignment textAlignment, TextDirection textDirection = TextDirection.LeftRight_TopBottom, int tabWidth = 0, TextFormatter? textFormatter = null)
Parameters
text
stringThe text to justify.
width
intThe number of columns to clip the text to. Text longer than
width
will be clipped.textAlignment
AlignmentAlignment.
textDirection
TextDirectionThe text direction.
tabWidth
intThe number of columns used for a tab.
textFormatter
TextFormatterTextFormatter instance to access any of his objects.
Returns
- string
Justified and clipped text.
ClipAndJustify(string, int, bool, TextDirection, int, TextFormatter?)
Justifies text within a specified width.
public static string ClipAndJustify(string text, int width, bool justify, TextDirection textDirection = TextDirection.LeftRight_TopBottom, int tabWidth = 0, TextFormatter? textFormatter = null)
Parameters
text
stringThe text to justify.
width
intThe number of columns to clip the text to. Text longer than
width
will be clipped.justify
boolJustify.
textDirection
TextDirectionThe text direction.
tabWidth
intThe number of columns used for a tab.
textFormatter
TextFormatterTextFormatter instance to access any of his objects.
Returns
- string
Justified and clipped text.