public ConditionSelectionMasterModel(ConditionService service) { Selector = new ConditionSelectorModel(service); Editor = new ConditionEditorModel(service); Selector.Edit += OnEdit; }
protected void SetModel(object sender, DependencyPropertyChangedEventArgs e) { Model = DataContext as ConditionEditorModel; if (Model == null) return; Model.OnEditComponentModel += EditComponentModel; Model.OnDeleteComponentModel += DeleteComponentModel; Model.OnConditionSelected += ConditionSelected; ComponentEditor.DataContext = Model.EditorModel; ConditionSelector.DataContext = Model.ConditionSelectorModel; }