Skip to main content
A newer version of this page is available. .

DataViewBase.GetCellElementByMouseEventArgs(MouseEventArgs) Method

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

Namespace: DevExpress.Xpf.Grid

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

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