I googled another solution:
Right click on your Project -> Properties -> Setting.
Add your variable which you need to store on client machine.
For example:
Name Type Scope Value
UserName String User
Password String User
Then, for example, you want to save preference on login button click:
If(CheckboxRemember.checked)
{
YourProjectNamespace.Properties.Settings.Default.UserName = TextBoxUserName.Text;
YourProjectNamespace.Properties.Settings.Default.Password = TextPassword.Text;
YourProjectNamespace.Properties.Settings.Default.Save();
}
On the same way, access these value on window load or application startup:
TextBoxUserName.Text = YourProjectNamespace.Properties.Settings.Default.UserName;
TextPassword.Text = YourProjectNamespace.Properties.Settings.Default.Password;