protected override void InitControl() { // the view model is created once and not disposed in OnUnloaded as this is a cached control this.viewModel = new ViewModelStructurePointsBarControl(); this.DataContext = this.viewModel; this.RefreshViewModelData(); }
protected override void InitControl() { this.viewModel = new ViewModelStructurePointsBarControl(); this.DataContext = this.viewModel; this.RefreshViewModelData(); }
protected override void OnUnloaded() { this.DataContext = null; this.viewModel.Dispose(); this.viewModel = null; }