DataViewBase.GetCellElementByMouseEventArgs(MouseEventArgs) Method
Returns a cell’s UI element located at the specified coordinates.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v20.2.Core.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
e | MouseEventArgs | The MouseEventArgs object. |
Returns
Type | Description |
---|---|
FrameworkElement | A FrameworkElement descendant that specifies the cell’s UI element, located at the specified position. |
Remarks
private void grid_MouseMove(object sender, System.Windows.Input.MouseEventArgs e) {
GridCellContentPresenter cell = grid.View.GetCellElementByTreeElement(
e.OriginalSource as DependencyObject)
as GridCellContentPresenter;
if (cell != null) {
// ...
}
}
See Also