Skip to content

Instantly share code, notes, and snippets.

@MartinZikmund
Created December 13, 2020 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinZikmund/495e08286c368a9d47825e82fa25dca7 to your computer and use it in GitHub Desktop.
Save MartinZikmund/495e08286c368a9d47825e82fa25dca7 to your computer and use it in GitHub Desktop.
private readonly DispatcherTimer _timer = new DispatcherTimer()
{
Interval = TimeSpan.FromSeconds(1)
};
private void AutoPlayToggled()
{
if (AutoPlayToggleSwitch.IsOn)
{
_timer.Start();
}
else
{
_timer.Stop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment