private PersonViewModel(Person person, PersonViewModel parent) { _person = person; _parent = parent; _children = new ReadOnlyCollection<PersonViewModel>( (from child in _person.Children select new PersonViewModel(child, this)) .ToList<PersonViewModel>()); }
public FamilyTreeViewModel(Person rootPerson) { _rootPerson = new PersonViewModel(rootPerson); _firstGeneration = new ReadOnlyCollection<PersonViewModel>( new PersonViewModel[] { _rootPerson }); _searchCommand = new SearchFamilyTreeCommand(this); }
public PersonViewModel(Person person) : this(person, null) { }