internal NotificationPart ToXmlPart()
        {
            var toast = new NotificationPart
            {
                ActivationType = this.ActivationType,
                Duration       = this.Duration,
                Launch         = this.Launch,
                Scenario       = this.Scenario
            };

            if (this.Visual != null)
            {
                toast.VisualPart = this.Visual.ToXmlPart();
            }

            if (this.Audio != null)
            {
                toast.Audio = this.Audio.ToXmlPart();
            }

            if (this.Actions != null)
            {
                toast.Actions = ConvertToActionsXmlPart(this.Actions);
            }

            return(toast);
        }
Example #2
0
        private void OpenNotificationsFlyout(object sender, RoutedEventArgs e)
        {
            NavigationViewItem item = sender as NavigationViewItem;

            item.ContextFlyout.Placement = FlyoutPlacementMode.Top;
            item.ContextFlyout.ShowAt(item);

            // register for callbacks
            NotificationPart notificationPart = (NotificationPart)((Flyout)item.ContextFlyout).Content;

            notificationPart.MainPage = this;
        }