【发布时间】:2019-01-21 19:53:58
【问题描述】:
我目前在 UWP 中工作,我需要创建一个 TreeView 来分层存储服务查询。例子: Example I have
我将信息保存在
public ObservableCollection <Model> name_of_object {get; set; } = new ObservableCollection <Model> ();
但我在 XAML 中创建了 TreeView,我看不到任何方法可以绑定到“SelectedItem”和“ItemSource”或任何方法来进行查询。
试过这个解决方案: Recursive XAML binding data templates on the Universal Windows Platform
我让它与一个查询一起工作,它对我有用,但我需要管理其他字段,我希望能够处理这个例子中的那个:
我想要这个,但在 UWP 中绑定到 ViewModel:
【问题讨论】:
标签: c# binding uwp treeview controls