/// <summary> /// Constructor. /// </summary> public CompositeViewVM() { _GridViewVM = new LinkedGridViewVM(); _TreeViewVM = new LinkedTreeViewVM(); _GridViewVM.PropertyChanged += (sender, e) => { if (e.PropertyName == "SelectedId") _TreeViewVM.ExpandTo(_GridViewVM.SelectedId); }; _TreeViewVM.PropertyChanged += (sender, e) => { if (e.PropertyName == "SelectedId") _GridViewVM.SelectedId = _TreeViewVM.SelectedId; }; }
/// <summary> /// Constructor. /// </summary> public CompositeViewVM(EmployeeModel model) { _gridViewVM = new LinkedGridViewVM(model); _treeViewVM = new LinkedTreeViewVM(model); _gridViewVM.PropertyChanged += (sender, e) => { if (e.PropertyName == "SelectedId") _treeViewVM.ExpandTo(_gridViewVM.SelectedId); }; _treeViewVM.PropertyChanged += (sender, e) => { if (e.PropertyName == "SelectedId") _gridViewVM.SelectedId = _treeViewVM.SelectedId; }; }
/// <summary> /// Constructor. /// </summary> public CompositeViewVM() { _GridViewVM = new LinkedGridViewVM(); _TreeViewVM = new LinkedTreeViewVM(); _GridViewVM.PropertyChanged += (sender, e) => { if (e.PropertyName == "SelectedId") { _TreeViewVM.ExpandTo(_GridViewVM.SelectedId); } }; _TreeViewVM.PropertyChanged += (sender, e) => { if (e.PropertyName == "SelectedId") { _GridViewVM.SelectedId = _TreeViewVM.SelectedId; } }; }
/// <summary> /// Constructor. /// </summary> public CompositeViewVM(EmployeeModel model) { _gridViewVM = new LinkedGridViewVM(model); _treeViewVM = new LinkedTreeViewVM(model); _gridViewVM.PropertyChanged += (sender, e) => { if (e.PropertyName == "SelectedId") { _treeViewVM.ExpandTo(_gridViewVM.SelectedId); } }; _treeViewVM.PropertyChanged += (sender, e) => { if (e.PropertyName == "SelectedId") { _gridViewVM.SelectedId = _treeViewVM.SelectedId; } }; }