Skip to main content

DataViewBase.GetCellElementByMouseEventArgs(MouseEventArgs) Method

Returns a cell’s UI element located at the specified coordinates.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v22.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public FrameworkElement GetCellElementByMouseEventArgs(
    MouseEventArgs e
)

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