Exemple #1
0
        private void LockTaskSwitch_Toggled(object sender, RoutedEventArgs e)
        {
            var toggle = (ToggleSwitch)sender;

            if (toggle.IsOn)
            {
                BackgroundTasks.RegisterLockscreenTask();
            }
            else
            {
                BackgroundTasks.UnregisterLockscreenTask();
            }
        }