In normal WinForms application you use Checkbox.Checked property to get or set value from your checkbox control, but when you try same thing in a WPF application you will get an error when you do the following.
1: this.chkIsDayOff.Checked = _selectedOccasionType.BlnIsDayOff;
and the error will be …
“The event 'System.Windows.Controls.Primitives.ToggleButton.Checked' can only appear on the left hand side of += or –=”
Because Checked which was property in WinForms, is now Event in WPF.
To resolve this issue use IsChecked Property, both for setting to checkbox or getting from checkbox.
1: this.chkIsDayOff.IsChecked = _SelectedOccasionType.BlnIsDayOff;