Exemplo n.º 1
0
 private static Category ReadCategory(XElement element)
 {
     var name = element.AttributeValue(NameAttr, true);
     var res = new Category {Name = name};
     foreach (var childElement in element.Elements())
     {
         res.AddChild(ReadItem(childElement));
     }
     return res;
 }
Exemplo n.º 2
0
 private void OnLoaded(object o)
 {
     TreeViewModel = new DocumentItemTreeViewModel();
     var testCategory = new Category {Name = "Test"};
     testCategory.AddChild(new Link {Name = "Google", Path = "http://google.com"});
     TreeViewModel.Categories.Add(testCategory);
     TreeViewModel.RightClickCommand.Subscribe(_ => AddRootCategory());
 }