diff --git a/src/Avalonia.Controls/Notifications/NotificationCard.cs b/src/Avalonia.Controls/Notifications/NotificationCard.cs index db136492ad..7f69afaeeb 100644 --- a/src/Avalonia.Controls/Notifications/NotificationCard.cs +++ b/src/Avalonia.Controls/Notifications/NotificationCard.cs @@ -25,7 +25,7 @@ namespace Avalonia.Controls.Notifications this.GetObservable(IsClosedProperty) .Subscribe(x => { - if (!IsClosing & !IsClosed) + if (!IsClosing && !IsClosed) { return; } @@ -88,26 +88,12 @@ namespace Avalonia.Controls.Notifications public static readonly DirectProperty IsClosedProperty = AvaloniaProperty.RegisterDirect(nameof(IsClosed), o => o.IsClosed, (o, v) => o.IsClosed = v); - /// - /// Defines the event. - /// - public static readonly RoutedEvent NotificationCloseInvokedEvent = - RoutedEvent.Register(nameof(NotificationCloseInvoked), RoutingStrategies.Bubble); - /// /// Defines the event. /// public static readonly RoutedEvent NotificationClosedEvent = RoutedEvent.Register(nameof(NotificationClosed), RoutingStrategies.Bubble); - /// - /// Raised when notification close event is invoked. - /// - public event EventHandler NotificationCloseInvoked - { - add { AddHandler(NotificationCloseInvokedEvent, value); } - remove { RemoveHandler(NotificationCloseInvokedEvent, value); } - } /// /// Raised when the has closed. @@ -169,8 +155,6 @@ namespace Avalonia.Controls.Notifications } IsClosing = true; - - RaiseEvent(new RoutedEventArgs(NotificationCloseInvokedEvent)); } } }