I want to show View Model on my UI using treeview, but I could not find a way to go more than one node deep
The view should show the Persons and their Adress and their Adress details
using System.Collections.ObjectModel;
using System.ComponentModel;
public class Person : INotifyPropertyChanged
{
public string Name { get; set; }
public Address Address { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
}
public class Address : INotifyPropertyChanged
{
public string Street { get; set; }
public Postcode Postcode { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
}
public class Postcode : INotifyPropertyChanged
{
public string Code { get; set; }
public string Name { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
}
Tried nesting them inside each other with Datatemplates but no success
New contributor
Patrik Valyon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.