<Window.Resources>
<Style TargetType="xcdg:DataCell">
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="dataCellMouseLeftButtonDown"/>
</Style>
<Style TargetType="xcdg:ColumnManagerCell">
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="colManagerMouseLeftButtonDown"/>
</Style>
</Window.Resources>
<xcdg:DataGridControl ItemsSource="{Binding}"/>
private void dataCellMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
MessageBox.Show("Left mouse button down on Cell");
}
private void colManagerMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
MessageBox.Show("Left mouse button down on Column manager cell");
}
Note If you replace the preview-events with the normal events, then the events will not be triggered by the datagrid. It will handle these mouse events itself (start inline edit and sorting resp.).