I am using a ToggleButton
in a WPF window:
You can attach a single click event of your ToggleButton
and in its handler you can check the ToggleButton
IsChecked
property by type casting the sender object in your handler like this -
private void ToggleButton_Click(object sender, RoutedEventArgs e)
{
if((sender as ToggleButton).IsChecked)
{
// Code for Checked state
}
else
{
// Code for Un-Checked state
}
}
Xaml:
Timeout