xamlwindows-8microsoft-metrotoggleswitch

How to set ToggleSwitch state to on or off in Windows8 Programmatically?


In my Metro App, I am having a Toggle Switch inside a Grid control. Now I want to change its state programmatically to on or off. I am using Xaml.


Solution

  • Use the ToggleSwitch.IsOn property: http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.toggleswitch.ison.aspx