Hi guys!
I'm hoping I can find some help here with saving user settings for checkboxes and radiobuttons. I can't seem to find anything on it on the internet but when I do it doesn't work. Any help will be appreciated!
:)
Squabbi
How to save User Settings in WPF?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

FroglegRank #1,020 · 1.9K reputationPosted Oct 6, 2013, 11:39 AM EDT
code:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
loadStuff();
}
public void loadStuff()
{
if (Properties.Settings.Default.ck1)
{
checkBox1.IsChecked = true;
}
else if (!Properties.Settings.Default.ck1)
{
checkBox1.IsChecked = false;
}
}
private void CheckBox_Checked(object sender, RoutedEventArgs e)
{
Properties.Settings.Default.ck1 = true;
Properties.Settings.Default.Save();
}
private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
{
Properties.Settings.Default.ck1 = false;
Properties.Settings.Default.Save();
}
}