Skip to main content
All docs
V26.1
  • CustomDrawCommentIndicatorEventArgs.CellBounds Property

    Returns the cell’s boundaries, excluding cell borders.

    Namespace: DevExpress.XtraSpreadsheet

    Assembly: DevExpress.XtraSpreadsheet.v26.1.dll

    NuGet Package: DevExpress.Win.Spreadsheet

    Declaration

    public Rectangle CellBounds { get; }

    Property Value

    Type Description
    Rectangle

    A rectangle that specifies the cell’s size and location.

    Remarks

    For a merged cell, the CellBounds property returns the boundaries of the entire merged area.

    The following example demonstrates how to use the CustomDrawCommentIndicator event to display a square comment indicator.

    Custom_Comment_Indicator_Shape

    spreadsheetControl1.CustomDrawCommentIndicator += (s, e) => {
        int size = e.Size;
        e.Cache.FillRectangle(e.Cache.GetSolidBrush(Color.FromArgb(0x21, 0x73, 0x46)), e.CellBounds.Right - size, e.CellBounds.Top, size, size);
        e.Handled = true;
    };
    
    See Also