Пример #1
0
        public void AddNotification(string text)
        {
            var nw = new NotificationWindow(this.FindAncestor <Window>(), NotificationTime, NotificationTemplate, _notificationsWindows, text);

            _notificationsWindows.Add(nw);
            nw.Closed += nw_Closed;
            nw.Show();
        }
Пример #2
0
 void Notifications_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.NewItems == null)
     {
         return;
     }
     foreach (var item in e.NewItems)
     {
         // notification windows management
         var nw = new NotificationWindow(this.FindAncestor <Window>(), NotificationTime, NotificationTemplate, _notificationsWindows)
         {
             DataContext = item
         };
         _notificationsWindows.Add(nw);
         nw.Closed += nw_Closed;
         nw.Show();
     }
 }