in my WPF program, I have a ListView with a column with a checkbox:
<ListView>
<ListView.View>
<GridView>
<GridViewColumn Header="Checkbox-Column">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Border BorderThickness="2" BorderBrush="AntiqueWhite">
<CheckBox IsChecked="{Binding Status}" />
</Border>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
When the user clicks on a checkbox, it should change it's state immediately. But actually, the user needs two clicks. The first click selects the row (or puts it into "edit-mode", though I'm not sure about this), and the second click then changes the checkbox state.
What can I do to force the checkbox to change with the first click?
EDIT: The reason for this behaviour is, that I use a bool? instead of a bool to bind against the checkbox. The initial value of the property is null (and it has to be), so the first click changes the value to false and the second to true (which is why it seems that the control doesn't react to the first click).
So - the question should be: How can I force the control to change from null to true and not to false?
Thanks in advance,
Frank