示例#1
0
        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;
        }
示例#2
0
        private void OnResetVisualTreeExecute()
        {
            TreeVisualOptions.Clear();
            var defaultTreesOPt = TreeVisualOption.DefaultTreeVisualOptions();

            foreach (var item in defaultTreesOPt)
            {
                TreeVisualOptions.Add(item);
                item.PropertyChanged += VisualTree_PropertyChanged;
            }
        }
示例#3
0
        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;
            }
        }