Пример #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();
        }