TableView.CalcHitInfo(DependencyObject) Method

Returns information about the specified element contained within the table view.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.1.dll

Declaration

public TableViewHitInfo CalcHitInfo(
    DependencyObject d
)
Public Function CalcHitInfo(
    d As DependencyObject
) As TableViewHitInfo

Parameters

Name Type Description
d DependencyObject

A DependencyObject object that represents the element contained within the table view.

Returns

Type Description
TableViewHitInfo

A TableViewHitInfo object that contains information about the specified view element.

Remarks

The CalcHitInfo method allows you to obtain information about any element contained within the table view. This can be useful when it is required to determine which element of a view a user has clicked or which element is located under the mouse pointer. The CalcHitInfo method returns a TableViewHitInfo object that contains the required information (visual element, its location within a view, etc.).

To learn more, see Hit Information.

Examples

This example shows how to determine which element in a table view is located under the mouse pointer.

private void grid_MouseMove(object sender, MouseEventArgs e) {
    TableViewHitInfo hi =
        ((TableView)grid.View).CalcHitInfo(e.OriginalSource as DependencyObject);
    textBlock.Text = hi.HitTest.ToString();
}
See Also