XRRichText.KeepTogether Property
Overrides the XRControl.KeepTogether property.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.1.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | false | true to keep the contents of the entire control on a single page; otherwise, false. |
Remarks
This property is overridden to change its default value to false.
The KeepTogether property specifies whether the contents of the control can be horizontally split across pages. In other words, if the contents of the control are larger than the remaining space on the page, this property specifies whether the control’s contents should be split across the current page and the next page, or whether the control will be printed in its entirety on the next page. Note, that this property is in effect only when a control’s contents don’t fit onto the current page.
Note
If the control still can’t be printed in it’s entirety on the next page (there isn’t enough space to keep all the control contents together), then it will be split as though this property’s value is set to false.
The following example demonstrates how the KeepTogether property is in effect for an XRLabel control.
The image below demonstrates a simple report with a label, in which the KeepTogether property is set to false. In this instance, a label is automatically split across two pages.
The next image illustrates the same label, in which the KeepTogether property is set to true. Note that in this instance a label is entirely moved to the next page to “keep its contents together”.
Note
This property is in effect when a control is split in a horizontal direction only. In a vertical direction (if a control contents are outside the right page margin) the XtraReport.VerticalContentSplitting property specifies whether a control should be split across pages.