In WPF data binding, I can bind the IsChecked property to some data, e.g. user setting, but I need to handle \"CheckChanged\" event, I know I can seperately handle <
Im putting this in an answer because it's too long for a comment:
If you need the VM to be aware when the CheckBox is changed, you should really bind the CheckBox to the VM, and not a static value:
public class ViewModel
{
private bool _caseSensitive;
public bool CaseSensitive
{
get { return _caseSensitive; }
set
{
_caseSensitive = value;
NotifyPropertyChange(() => CaseSensitive);
Settings.Default.bSearchCaseSensitive = value;
}
}
}
XAML: