public INotificationControl Publish(Notification notification) { OpenNotifications.Add(notification); ShownNotifications.Add(notification); return(new NotificationControl(notification, this)); }
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); }
private void CloseAllNotificationsClick(object sender, RoutedEventArgs e) { ShownNotifications.Clear(); OpenNotifications.Clear(); }