RichTextBlock.MaxLines RichTextBlock.MaxLines RichTextBlock.MaxLines RichTextBlock.MaxLines Property

Definition

Gets or sets the maximum lines of text shown in the RichTextBlock.

public : int MaxLines { get; set; }
int32_t MaxLines();

void MaxLines(int32_t maxlines);
public int MaxLines { get; set; }
Public ReadWrite Property MaxLines As int
<RichTextBlock MaxLines="int"/>

Property Value

int int

The maximum lines of text shown in the RichTextBlock. The default is 0, which is a special value that represents "Auto" behavior. The value cannot be negative.

Remarks

Use the MaxLines property to specify the maximum lines of text shown in a text block. The text control will adjust it’s height to show no more than the specified number of lines, regardless of the font size, font style, or text length.

Negative integer values are invalid, and will cause a run-time exception.