protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            appCapture.CapturingChanged -= AppCapture_CapturingChanged;

            // Re-enable app capture when navigating away.
            var task = AppCapture.SetAllowedAsync(true);
        }
 async void AllowAppCaptureCheckBox_Toggled(object sender, RoutedEventArgs e)
 {
     ToggleSwitch toggleSwitch = (ToggleSwitch)sender;
     await AppCapture.SetAllowedAsync(toggleSwitch.IsOn);
 }