Пример #1
0
        protected override void OnLoaded()
        {
            this.layoutRoot.DataContext = this.viewModel = new ViewModelRatesEditorControl(
                () => this.AnyRateChanged?.Invoke());

            if (this.lastPreset is not null)
            {
                this.ApplyPreset(this.lastPreset);
            }
        }
Пример #2
0
 protected override void OnUnloaded()
 {
     this.layoutRoot.DataContext = null;
     this.viewModel.Dispose();
     this.viewModel = null;
 }