SharpLeaf Reference > ParagraphStyle Structure > Keep Property

ParagraphStyle.Keep Property

Number of lines to keep together at the start or end of a paragraph – also known as widows and orphans (default is 1 for disabled).

public int Keep {get; set;}

Example

style.Keep = 3;

Description

The default value is 1, the minimum value, which disables widow/orphan control. A Keep value higher than 1 may have significant resource consumption. So a paragraph can be split only if it has more than (2*Keep) lines, below that it is impossible to respect both conditions, and the whole paragraph will be started on the next frame, leaving a “hole” of up to (2*Keep)-1 lines.

Meaningful only when using Frame.Skip is on.

See also ...

Widow and Orphan Control | ParagraphStyle.Members


Send comments on this topic
© Dyalog Ltd 2021