Beispiel #1
0
        private async void PictureHost_Loaded(object sender, RoutedEventArgs e)
        {
            // Host the Composition scene inside the PictureHost canvas, allowing us to also display
            // Xaml controls.

            _rootVisual      = GetVisual(PictureHost);
            _compositor      = _rootVisual.Compositor;
            _imageFactory    = CompositionImageFactory.CreateCompositionImageFactory(_compositor);
            _rootVisual.Clip = _compositor.CreateInsetClip(0, 0, 0, 0);


            // Begin the TransitionController to load images and kick off animations.

            _transitionController = new TransitionController();
            await _transitionController.Create(_rootVisual, _imageFactory);

            var actualSize = new Vector2((float)PictureHost.ActualWidth, (float)PictureHost.ActualHeight);

            _transitionController.UpdateWindowSize(actualSize);

            NearSlideCheckBox_Click(this, null);
            FarSlideCheckBox_Click(this, null);
            FlashlightCheckBox_Click(this, null);
            ZoomCheckBox_Click(this, null);
            StackCheckBox_Click(this, null);

            _transitionController.NextTransition();
        }
Beispiel #2
0
        private async void PictureHost_Loaded(object sender, RoutedEventArgs e)
        {
            // Host the Composition scene inside the PictureHost canvas, allowing us to also display
            // Xaml controls.

            _rootVisual = GetVisual(PictureHost);
            _compositor = _rootVisual.Compositor;
            _imageFactory = CompositionImageFactory.CreateCompositionImageFactory(_compositor);
            _rootVisual.Clip = _compositor.CreateInsetClip(0, 0, 0, 0);


            // Begin the TransitionController to load images and kick off animations.

            _transitionController = new TransitionController();
            await _transitionController.Create(_rootVisual, _imageFactory);

            var actualSize = new Vector2((float)PictureHost.ActualWidth, (float)PictureHost.ActualHeight);
            _transitionController.UpdateWindowSize(actualSize);

            NearSlideCheckBox_Click(this, null);
            FarSlideCheckBox_Click(this, null);
            FlashlightCheckBox_Click(this, null);
            ZoomCheckBox_Click(this, null);
            StackCheckBox_Click(this, null);

            _transitionController.NextTransition();
        }
Beispiel #3
0
        private async void PictureHost_Loaded(object sender, RoutedEventArgs e)
        {
            // Check that there are photos in the pictures folder

            if (!await PhotoDatabase.PhotosExist())
            {
                MessageDialog messageDialog = new MessageDialog("Add some photos to your Pictures folder");
                await messageDialog.ShowAsync();

                MissingPictures.Visibility = Visibility.Visible;
                return;
            }

            // Host the Composition scene inside the PictureHost canvas, allowing us to also display
            // Xaml controls.

            _rootVisual      = GetVisual(PictureHost);
            _compositor      = _rootVisual.Compositor;
            _rootVisual.Clip = _compositor.CreateInsetClip(0, 0, 0, 0);


            // Begin the TransitionController to load images and kick off animations.

            _transitionController = new TransitionController();
            await _transitionController.Create(_rootVisual);

            var actualSize = new Vector2((float)PictureHost.ActualWidth, (float)PictureHost.ActualHeight);

            _transitionController.UpdateWindowSize(actualSize);

            NearSlideCheckBox_Click(this, null);
            FarSlideCheckBox_Click(this, null);
            FlashlightCheckBox_Click(this, null);
            ZoomCheckBox_Click(this, null);
            StackCheckBox_Click(this, null);

            _transitionController.NextTransition();
        }
Beispiel #4
0
        private async void PictureHost_Loaded(object sender, RoutedEventArgs e)
        {
            // Check that there are photos in the pictures folder

            if (!await PhotoDatabase.PhotosExist())
            {
                MessageDialog messageDialog = new MessageDialog("Add some photos to your Pictures folder");
                await messageDialog.ShowAsync();
                MissingPictures.Visibility = Visibility.Visible;
                return;
            }

            // Host the Composition scene inside the PictureHost canvas, allowing us to also display
            // Xaml controls.

            _rootVisual = GetVisual(PictureHost);
            _compositor = _rootVisual.Compositor;
            _rootVisual.Clip = _compositor.CreateInsetClip(0, 0, 0, 0);


            // Begin the TransitionController to load images and kick off animations.

            _transitionController = new TransitionController();
            await _transitionController.Create(_rootVisual);

            var actualSize = new Vector2((float)PictureHost.ActualWidth, (float)PictureHost.ActualHeight);
            _transitionController.UpdateWindowSize(actualSize);

            NearSlideCheckBox_Click(this, null);
            FarSlideCheckBox_Click(this, null);
            FlashlightCheckBox_Click(this, null);
            ZoomCheckBox_Click(this, null);
            StackCheckBox_Click(this, null);

            _transitionController.NextTransition();
        }