In a WPF app using C#, I want to bind the default value of a CheckBox
to the value of an Application Setting (Properties.Settings.Default.OpenAutomatically
of type bool
), such that when the form loads, the CheckBox
is automatically set to the value read from the bound Application Setting.
Secondly, when the CheckBox
's value changes (via the user clicking on it), the bool
Application Setting should be kept in sync (true if checked, false if unchecked).
This seems like something .NET should give you out of the box without having to write code to keep the Setting in sync when a user manipulates the UI.
Thanks in advance for your help.