Пример #1
0
        protected override void OnSourceInitialized(EventArgs e)
        {
            base.OnSourceInitialized(e);

            WindowEffect.EnableBackgroundTranslucency(this);

            #region Size

            // This restoration must be done here because the DPI value is incorrect at constructor.
            RestoreWindowSize();

            Observable.FromEventPattern <SizeChangedEventHandler, SizeChangedEventArgs>(
                h => this.SizeChanged += h,
                h => this.SizeChanged -= h)
            .Subscribe(x => SaveWindowSize(x.EventArgs.NewSize))
            .AddTo(this.Subscription);

            Observable.FromEventPattern(
                h => _mover.IsDepartedChanged += h,
                h => _mover.IsDepartedChanged -= h)
            .Subscribe(_ => SetResizeBorderThickness())
            .AddTo(this.Subscription);

            #endregion
        }
Пример #2
0
        protected override void OnSourceInitialized(EventArgs e)
        {
            base.OnSourceInitialized(e);

            WindowEffect.EnableBackgroundBlur(this);
        }