Back to Devexpress

CustomDrawHeaderEventArgsBase.IsHovered Property

windowsforms-devexpress-dot-xtraspreadsheet-dot-customdrawheadereventargsbase-637ebce4.md

latest2.6 KB
Original Source

CustomDrawHeaderEventArgsBase.IsHovered Property

Gets whether a mouse is currently over the worksheet header.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public bool IsHovered { get; }
vb
Public ReadOnly Property IsHovered As Boolean

Property Value

TypeDescription
Boolean

true if a row or column header is hovered over with a mouse; otherwise, false.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsHovered property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-spreadsheet-custom-draw-example/CS/WindowsFormsApp1/Form1.cs#L172

csharp
if (e.ColumnIndex <= 4) {
    var backColor = e.IsHovered || (e.ColumnIndex == spreadsheetControl1.ActiveCell.ColumnIndex) ?
        //Color 1

winforms-spreadsheet-custom-draw-example/VB/CustomDrawExample/Form1.vb#L67

vb
If e.ColumnIndex <= 4 Then
    Dim backColor = If(e.IsHovered OrElse (e.ColumnIndex = spreadsheetControl1.ActiveCell.ColumnIndex),
        Color.FromArgb(200, 44, 74), 'Color 1

See Also

CustomDrawHeaderEventArgsBase Class

CustomDrawHeaderEventArgsBase Members

DevExpress.XtraSpreadsheet Namespace