public void Setup(ViewModelEditorToolZonesSettings viewModel) { this.ViewModel = viewModel; if (this.isLoaded) { this.DataContext = this.ViewModel; } }
public override FrameworkElement CreateSettingsControl() { var control = new EditorToolZonesSettings(); if (this.settings is null) { this.settings = new ViewModelEditorToolZonesSettings(); this.settings.BrushSettingsChanged += this.RefreshActiveTool; this.settings.SelectedZonesForRenderingChanged += this.RefreshActiveTool; } control.Setup(this.settings); return(control); }