Пример #1
0
        public BasicUsePage()
        {
            this.InitializeComponent();

            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            SystemNavigationManager.GetForCurrentView().BackRequested += (o, e) =>
            {
                Frame.Navigate(typeof(MainPage), ImageElement.Source);
            };

            this.PropertyChanged += (o, e) =>
            {
                SetUpRenderingChain();
                ImageElement.Render();
            };

            logoEffect = new BlendEffect();
            logoEffect.ForegroundSource   = ImageResourceProvider.NTKLogo;
            logoEffect.TargetArea         = new Rect(0.9, 0.9, 0.1, 0.1);
            logoEffect.TargetOutputOption = OutputOption.PreserveAspectRatio;

            bozjakHeadshotEffect = new BlendEffect();
            bozjakHeadshotEffect.ForegroundSource   = ImageResourceProvider.BozjakHeadshot;
            bozjakHeadshotEffect.TargetArea         = new Rect(0.05, 0.05, 0.2, 0.2);
            bozjakHeadshotEffect.TargetOutputOption = OutputOption.PreserveAspectRatio;

            blurEffect = new BlurEffect();
        }
Пример #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (e.Parameter is IImageProvider)
            {
                ImageElement.Source = (IImageProvider)e.Parameter;
            }
            else
            {
                ImageElement.Render();
            }
        }
Пример #3
0
        public CartoonPage()
        {
            this.InitializeComponent();

            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            SystemNavigationManager.GetForCurrentView().BackRequested += (o, e) =>
            {
                Frame.Navigate(typeof(MainPage), ImageElement.Source);
            };

            this.PropertyChanged += (o, e) =>
            {
                ImageElement.Render();
            };
        }
Пример #4
0
        public DrawPage()
        {
            this.InitializeComponent();

            SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            SystemNavigationManager.GetForCurrentView().BackRequested += (o, e) =>
            {
                Frame.Navigate(typeof(MainPage), ImageElement.Source);
            };

            this.PropertyChanged += (o, e) =>
            {
                ImageElement.Render();
            };

            MyInkCanvas.InkPresenter.IsInputEnabled   = true;
            MyInkCanvas.InkPresenter.InputDeviceTypes = CoreInputDeviceTypes.Mouse | CoreInputDeviceTypes.Touch | CoreInputDeviceTypes.Pen;
        }