Esempio n. 1
0
        private static async void Close(PopupNotify popup)
        {
            popup.ClickClose -= Popup_ClickClose;
            popup.BeginAnimation(UserControl.OpacityProperty, Hide);
            Notifications.Notifications.Remove(popup.notifyModel);
            await Task.Delay(Hide.Duration.TimeSpan);

            UIElementCollection collection = NotifyList.NotifyPanel?.panelList.Children;

            NotifyList.NotifyPanel?.panelList.Children.Remove(popup);
        }
Esempio n. 2
0
        private async static void Close(PopupNotify popup)
        {
            popup.ClickClose -= Popup_ClickClose;
            popup.BeginAnimation(UserControl.OpacityProperty, Hide);
            await Task.Delay(Hide.Duration.TimeSpan);

            UIElementCollection collection = NotifyList.NotifyPanel?.panelList.Children;

            if (collection.Count > 0 && (PopupNotify)collection[0] == popup)
            {
                run = false;
            }

            NotifyList.NotifyPanel?.panelList.Children.Remove(popup);
            Show();
        }