diff --git a/Notifications.Wpf/Controls/Notification.cs b/Notifications.Wpf/Controls/Notification.cs index 58ab8aa..3e8ebae 100644 --- a/Notifications.Wpf/Controls/Notification.cs +++ b/Notifications.Wpf/Controls/Notification.cs @@ -105,9 +105,16 @@ public async void Close() IsClosing = true; - RaiseEvent(new RoutedEventArgs(NotificationCloseInvokedEvent)); - await Task.Delay(_closingAnimationTime); - RaiseEvent(new RoutedEventArgs(NotificationClosedEvent)); + try + { + RaiseEvent(new RoutedEventArgs(NotificationCloseInvokedEvent)); + await Task.Delay(_closingAnimationTime); + RaiseEvent(new RoutedEventArgs(NotificationClosedEvent)); + } + catch (Exception) + { + // Fail silently (already closing) + } } } }