Skip to main content

CardHitTest Enum

Lists values identifying Card View’s visual elements.

Namespace: DevExpress.XtraGrid.Views.Card.ViewInfo

Assembly: DevExpress.XtraGrid.v24.2.dll

Declaration

public enum CardHitTest

Members

Name Description
None

The test point does not belong to any Card View visual element or is outside the View.

Card

The test point belongs to a card‘s area not occupied by card constituent elements (in other words, the point belongs to a card’s edge).

CardCaption

The test point belongs to a card’s caption.

CardExpandButton

The test point belongs to the card expand button that resides within the card caption and is used to expand/collapse the card.

Field

The test point belongs to a card field‘s area which is not occupied by the field caption or field value cell (in other words, the point belongs to a field edge).

FieldCaption

The test point belongs to a field caption.

FieldValue

The test point belongs to a field value cell.

Separator

The test point belongs to a card separator.

CardUpButton

The test point belongs to a top card scroll button.

CardDownButton

The test point belongs to a bottom card scroll button.

CardCaptionErrorIcon

The test point belongs to an error icon displayed within a card caption. Such error icons are displayed when cards fail to be validated.

QuickCustomizeButton

The test point belongs to the customization button.

CloseZoomButton

The test point belongs to a Card View’s zoom button.

FilterPanel

The test point belongs to a filter panel.

FilterPanelCloseButton

The test point belongs to a filter panel close button.

FilterPanelActiveButton

The test point belongs to the check box in the filter panel used to enable/disable filtering within a Card View.

FilterPanelText

The test point belongs to a string in the filter panel which represents the filter criteria applied to a Card View.

FilterPanelMRUButton

The test point belongs to a button in the filter panel used to display a dropdown window with a list of the most recently used filter criteria.

FilterPanelCustomizeButton

The test point belongs to the filter panel customize button.

ViewCaption

The test point belongs to the View Caption.

MasterTabPageHeader

The test point belongs to the View’s master-detail tab.

Related API Members

The following properties accept/return CardHitTest values:

Remarks

CardHitTest enumeration values are returned by the CardHitInfo.HitTest property of a CardHitInfo object. CardHitInfo objects can be created by calling the Card View’s CardView.CalcHitInfo method.

The following images illustrate some visual elements and corresponding enumeration values. For a complete list of enumeration values, see the table below.

CardHitTest_class_1.gif

CardHitTest_class_2.gif

Example

The following sample code shows how to identify the element located at a specific point using the GridView.CalcHitInfo method.

In the example, the CalcHitInfo method is called when you move the cursor over a Grid Control. The name of the current View element is displayed in the form’s caption.

using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.Base.ViewInfo;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
// ...
private void gridControl1_MouseMove(object sender, MouseEventArgs e) {
    GridControl grid = sender as GridControl;
    if (grid == null) return;
    // Get a View at the current point.
    BaseView view = grid.GetViewAt(e.Location);
    if (view == null) return;
    // Retrieve information on the current View element.
    BaseHitInfo baseHI = view.CalcHitInfo(e.Location);
    GridHitInfo gridHI = baseHI as GridHitInfo;
    if (gridHI != null)
        Text = gridHI.HitTest.ToString();
}
See Also