private void Add() { Subitems.Add(new HierarchicalElementViewModel(this) { Name = "Child Element" }); }
public AnalyticItemViewModel(IAnalyticItem analyticItem) { if (analyticItem == null) { throw new ArgumentNullException("analyticItem"); } this.analyticItem = analyticItem; IAnalyticModel analyticModel = analyticItem as IAnalyticModel; if (analyticModel != null) { foreach (IAnalyticModel submodel in analyticModel.Models) { Subitems.Add(new AnalyticItemViewModel(submodel)); } foreach (IAnalyticRule subrule in analyticModel.Rules) { Subitems.Add(new AnalyticItemViewModel(subrule)); } } InitializeHistory(analyticItem.MarksHistory); }
public void AppendChild(CanonicalItem child) { Subitems.Add(child); child.Parent = this; }