Skip to main content

IRangeControlClient.CalculateSelectionBounds(RangeControlPaintEventArgs, Rectangle) Method

When implemented by a class, this method allows you to provide custom selection bounds.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Data.v24.2.dll

NuGet Package: DevExpress.Data

#Declaration

Rectangle CalculateSelectionBounds(
    RangeControlPaintEventArgs e,
    Rectangle rect
)

#Parameters

Name Type Description
e DevExpress.XtraEditors.RangeControlPaintEventArgs

Provides data used to paint the selection.

rect Rectangle

Specifies the selected region’s bounds.

#Returns

Type Description
Rectangle

Returns custom bounds of the selected region.

#Remarks

To following code shows how to implement the CalculateSelectionBounds and DrawSelection methods to apply the default painting of the selected region.

Rectangle IRangeControlClient.CalculateSelectionBounds(RangeControlPaintEventArgs e, Rectangle rect) {
    return rect;
}
void IRangeControlClient.DrawSelection(RangeControlPaintEventArgs e) {
}
See Also