views:

17

answers:

1

I have two simple related controls on a form, a delete button and a confirm delete checkbox.

The idea is to protect against accidental deletions (don't worry, undo will be added later) but still allow the user to delete without annoying confirmations if they so wish.

However, I want the initial state of the checkbox to be set. The XAML code is currently:

<CheckBox Margin="0 5 0 0"
          x:Name="chkConfirmDel"
          Checked="chkConfirmDel_Change">
    Confirm delete?
</CheckBox>

but I can't see any obvious property for forcing the initial state, either in XAML or in the Window_Loaded() code.

+2  A: 

IsChecked="True"

Quartermeister