DataViewBase.GetCellElementByMouseEventArgs(MouseEventArgs) Method

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

Namespace: DevExpress.Xpf.Grid

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

Declaration

public FrameworkElement GetCellElementByMouseEventArgs(
    MouseEventArgs e
)
Public Function GetCellElementByMouseEventArgs(
    e As MouseEventArgs
) As FrameworkElement

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