So I have a checkbox in my datagrid. I click it and a messagebox opens up:
public void Checked(Opcina opc)
{
opc.Status = 0;
if (MessageBox.Show("Želite li ukloniti općinu?","Potvrda", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
Opcine.Remove(opc);
else
{
}Now this all works, but as you can see my else statement is just empty. So what happens is that the checkbox will go from checked to unchecked and I don't want that. I want it to stay checked if the user presses no. I want nothing to change, but the checkbox changes.
How can I prevent that?