예제 #1
0
        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)));
        }
예제 #2
0
        protected override void HandleClosed()
        {
            _current = null;

            base.HandleClosed();
        }