Ejemplo n.º 1
0
        private void CreateTeachingTip(FrameworkElement element)
        {
            AutoCloseTeachingTip teachingTip = new AutoCloseTeachingTip
            {
                Target            = element,
                Content           = Strings.Resources.AccountCodePageCopyCodeTeachingTip,
                AutoCloseInterval = 1000,
                BorderBrush       = new SolidColorBrush((Color)App.Current.Resources["SystemAccentColor"]),
                IsOpen            = true,
            };

            MainGrid.Children.Add(teachingTip);
        }
        private void Action_Executed()
        {
            var _actionTeachingTip = new AutoCloseTeachingTip
            {
                Title       = "Well, eat this then.",
                Content     = "Don't worry, you will soon feel better.",
                HeroContent = new Image
                {
                    Source = new BitmapImage(new Uri("ms-appx:///Assets/Heather.jpg"))
                },
                PreferredPlacement = TeachingTipPlacementMode.Right,
                IsOpen             = true
            };

            (Content as Grid).Children.Add(_actionTeachingTip);
        }
        private void Close_Executed()
        {
            var _closeTeachingTip = new AutoCloseTeachingTip
            {
                Title       = "Then what are you still doing there?",
                Content     = "We are all waiting for you in the factory.",
                HeroContent = new Image
                {
                    Source = new BitmapImage(new Uri("ms-appx:///Assets/BrimbornSteelworks.png"))
                },
                PreferredPlacement = TeachingTipPlacementMode.Right,
                IsOpen             = true
            };

            (Content as Grid).Children.Add(_closeTeachingTip);
        }