Example #1
0
        public void UpdateWindowPositions(double actualHeight, NotificationWindow notificationWindow, int id)
        {
            while (id < currentLowId)
            {
            }

            if (this.notificationWindows.Count > 0)
            {
                // We Will have to Push all the windows Up
                foreach (NotificationWindow window in notificationWindows)
                {
                    window.Top -= actualHeight;
                }
            }

            currentLowId++;

            Task.Factory.StartNew(() => {
                this.notificationWindows.Add(notificationWindow);
                Thread.Sleep(TimeSpan.FromSeconds(10));
                this.notificationWindows.Remove(notificationWindow);
                App.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() => {
                    notificationWindow.Close();
                }));
            });
        }