public override void Show() { _current?.Close(); base.Show(); _current = this; }
public static IDisposable BindAutohide( this NotificationWindow window) { var timer = Observable.Timer(TimeSpan.FromSeconds(5)) .SubscribeOn(RxApp.TaskpoolScheduler) .ObserveOn(RxApp.MainThreadScheduler) .Accept(_ => { window.Close(); }); return(new CompositeDisposable( timer, Disposable.Create(window.Close))); }