Beispiel #1
0
        public INotificationControl Publish(Notification notification)
        {
            OpenNotifications.Add(notification);
            ShownNotifications.Add(notification);

            return(new NotificationControl(notification, this));
        }
Beispiel #2
0
        private void HideNotificationClick(object sender, RoutedEventArgs e)
        {
            var control = sender as FrameworkElement;
            var notice  = control?.DataContext as Notification;

            if (notice == null)
            {
                return;
            }

            ShownNotifications.Remove(notice);
        }
Beispiel #3
0
 private void CloseAllNotificationsClick(object sender, RoutedEventArgs e)
 {
     ShownNotifications.Clear();
     OpenNotifications.Clear();
 }