Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

CustomDrawCommentIndicatorEventArgs.CellBounds Property

Returns the cell’s boundaries, excluding cell borders.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v24.2.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