private void OnAddVisualTreeExecute() { var lastVisOpt = TreeVisualOptions.Last(); var c = TreeVisualOption.GetNextColor(lastVisOpt.Color); var visTree = new TreeVisualOption(c, lastVisOpt.Height + 10); TreeVisualOptions.Add(visTree); visTree.PropertyChanged += VisualTree_PropertyChanged; }
private void OnResetVisualTreeExecute() { TreeVisualOptions.Clear(); var defaultTreesOPt = TreeVisualOption.DefaultTreeVisualOptions(); foreach (var item in defaultTreesOPt) { TreeVisualOptions.Add(item); item.PropertyChanged += VisualTree_PropertyChanged; } }
private void HeightChanged() { // Провеерка высот var treeVisOpts = TreeVisualOptions.ToList(); TreeVisualOption.CheckAndCorrect(ref treeVisOpts); TreeVisualOptions.Clear(); foreach (var item in treeVisOpts) { TreeVisualOptions.Add(item); item.PropertyChanged += VisualTree_PropertyChanged; } }