When I create a DataGrid, by default, to select a row, I need to click on the control inside the cell.
I want to select the row wherever I click in the row.
Is there a way to do that?
<DataGrid AutoGenerateColumns="False"
CanUserAddRows="False"
IsReadOnly="True"
Style="{StaticResource DataGridStyle}"
HorizontalContentAlignment ="Center"
VerticalContentAlignment ="Center"
VerticalScrollBarVisibility="Auto"
SelectionMode="Single"
ItemsSource="{Binding Items, Mode=OneWay}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
<DataGrid.Columns>
<DataGridTextColumn Header="Name"
Binding="{Binding Name}"
Width="4*" />
<DataGridTextColumn Header="Description"
Binding="{Binding Description}"
Width="4*" />
</DataGrid.Columns>