Beispiel #1
0
        public DescriptorItemViewModel(DescriptorItem item, DescriptorItemViewModel parent)
        {
            _item  = item;
            Parent = parent;

            Children = new BindableCollection <DescriptorItemViewModel>(
                from child in _item.Children select new DescriptorItemViewModel(child, this));
        }
Beispiel #2
0
        public void AddChild()
        {
            DescriptorItem item = new DescriptorItem("Test3");

            item.Values.Add(new DescriptorItem.DescriptorProperty("a", new DescriptorItem.DescriptorValue(121, "ubyte")));
            item.Values.Add(new DescriptorItem.DescriptorProperty("a", new DescriptorItem.DescriptorValue(10, "ushort")));
            DescriptorItemViewModel desc = new DescriptorItemViewModel(item, this);

            Children.Add(desc);
        }
Beispiel #3
0
        public CustomTreeViewModel()
        {
            Title = "Test";
            DescriptorItem item = new DescriptorItem()
            {
                Type = "Test"
            };

            RootItem        = new DescriptorItemViewModel(item);
            FirstGeneration = new BindableCollection <DescriptorItemViewModel>();
            FirstGeneration.Add(RootItem);
        }