private void NotifyWindow_Loaded(object sender, RoutedEventArgs e) { notifyTop = (NotifyTops.Any() ? NotifyTops.Max() : 0) + this.ActualHeight; NotifyTops.Add(notifyTop); if (this.Owner != null) { switch (Owner.WindowState) { case WindowState.Normal: this.Left = this.Owner.Left + this.Owner.ActualWidth - this.ActualWidth; this.Top = this.Owner.Top + this.Owner.ActualHeight - notifyTop; break; case WindowState.Minimized: case WindowState.Maximized: default: this.Left = SystemParameters.WorkArea.Width - this.ActualWidth; this.Top = SystemParameters.WorkArea.Height - notifyTop; break; } } }
private void SBFade_Completed(object sender, System.EventArgs e) { this.Close(); NotifyTops.Remove(notifyTop); }