setting state of windows phone toolkit toggle switch

423 Views Asked by At

I'm working on a windows phone 8 application. I want to use toggle switch for some purposes. Sadly windows phone 8 does not have that controller. So i had to install windows phone toolkit nuget package.

Now I want to set the state(some thing like isChecked=true). but I couldn't find any method to use. can someone please help me.

1

There are 1 best solutions below

0
On BEST ANSWER

Try this on Button Click

private void Button_Click(object sender, RoutedEventArgs e)
{
    if (toggleSwitch.IsChecked == true)
        toggleSwitch.IsChecked = false;
    else
        toggleSwitch.IsChecked = true;
}

It is Working....