Skip to content

Instantly share code, notes, and snippets.

@wtuts
Created June 27, 2014 17:15
Show Gist options
  • Save wtuts/c803291ed52044c11d51 to your computer and use it in GitHub Desktop.
Save wtuts/c803291ed52044c11d51 to your computer and use it in GitHub Desktop.
toggle switch check status change
private void RadToggleSwitch_CheckedChanged(object sender, Telerik.Windows.Controls.CheckedChangedEventArgs e)
{
Telerik.Windows.Controls.RadToggleSwitch swtch = (Telerik.Windows.Controls.RadToggleSwitch)sender;
if (swtch.IsChecked == true)
{
if (App.islocked)
{
old_pin.Visibility = Visibility.Visible;
setpw.Visibility = Visibility.Visible;
}
else
setpw.Visibility = Visibility.Visible;
}
else
{
IsolatedStorageSettings.ApplicationSettings["islocked"] = false;
IsolatedStorageSettings.ApplicationSettings["password"] = String.Empty;
old_pin.Visibility = Visibility.Collapsed;
setpw.Visibility = Visibility.Collapsed;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment