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

            // Re-enable app capture when navigating away.
            var task = AppCapture.SetAllowedAsync(true);
        }
        private void Start()
        {
            Reset();
            BuildWindow();
            BuildFrameRateStrings();

#if WINDOWS_UWP
            appCapture = AppCapture.GetForCurrentView();
#endif // WINDOWS_UWP
        }
Ejemplo n.º 3
0
        private void Start()
        {
            Reset();
            BuildWindow();
            BuildFrameRateStrings();

#if WINDOWS_UWP
            appCapture = AppCapture.GetForCurrentView();
            if (appCapture != null)
            {
                appCaptureIsCapturingVideo   = appCapture.IsCapturingVideo;
                appCapture.CapturingChanged += AppCapture_CapturingChanged;
            }
#endif // WINDOWS_UWP
        }
Ejemplo n.º 4
0
 private void AppCapture_CapturingChanged(AppCapture sender, object args) => appCaptureIsCapturingVideo = sender.IsCapturingVideo;
 void AppCapture_CapturingChanged(AppCapture sender, object e)
 {
     UpdateCaptureStatus();
 }
 async void AllowAppCaptureCheckBox_Toggled(object sender, RoutedEventArgs e)
 {
     ToggleSwitch toggleSwitch = (ToggleSwitch)sender;
     await AppCapture.SetAllowedAsync(toggleSwitch.IsOn);
 }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     appCapture = AppCapture.GetForCurrentView();
     appCapture.CapturingChanged += AppCapture_CapturingChanged;
     UpdateCaptureStatus();
 }