CardView.CalcHitInfo(DependencyObject) Method
Returns information about the specified element contained within the card view.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v20.2.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
d | DependencyObject | A DependencyObject object that represents the element contained within the card view. |
Returns
Type | Description |
---|---|
CardViewHitInfo | A CardViewHitInfo object that contains information about the specified view element. |
Remarks
The CalcHitInfo method allows you to obtain information about any element contained within the card 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 CardViewHitInfo object that contains the required information (visual element, its location within a view, etc.).
To learn more, see Hit Information.
Example
This example shows how to determine which element in a card view is located under the mouse pointer.
private void grid_MouseMove(object sender, MouseEventArgs e) {
CardViewHitInfo hi =
((CardView)grid.View).CalcHitInfo(e.OriginalSource as DependencyObject);
textBlock.Text = hi.HitTest.ToString();
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CalcHitInfo(DependencyObject) method.
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.