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(); } }