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.v22.2.dll

NuGet Package: DevExpress.Data


Rectangle CalculateSelectionBounds(
    RangeControlPaintEventArgs e,
    Rectangle rect


Name Type Description
e DevExpress.XtraEditors.RangeControlPaintEventArgs

Provides data used to paint the selection.

rect Rectangle

Specifies the selected region’s bounds.


Type Description

Returns custom bounds of the selected region.


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