Example #1
0
        private void StopPreview()
        {
            _preview?.Dispose();
            _preview = null;

            StartButton.IsEnabled = true;
        }
Example #2
0
        private void StartPreview(GraphicsCaptureItem item)
        {
            var compositor = Window.Current.Compositor;

            _preview?.Dispose();
            _preview = new CapturePreview(_device, item);
            var surface = _preview.CreateSurface(compositor);

            _previewBrush.Surface = surface;
            _preview.StartCapture();

            StartButton.IsEnabled = false;
        }