Linq query to treeview HierarchicalDataTemplate
问题 First, sorry for my bad english. I have an EF entity that looks like: class Item { public Guid Id { get; set; } public string Title{ get; set; } public Guid? ParentId { get; set; } public ICollection<Item> Items { get; set; } } Now i want to load the data from that entity on a treeview... the best I could get is the follow xaml: <TreeView Name="treeItems"> <TreeView.ItemTemplate> <HierarchicalDataTemplate DataType="{x:Type local:Item}" ItemsSource="{Binding Items}"> <TextBlock Text="{Binding