1

我有一个使用 RadTreeListView 绑定并显示为树的应用程序。ItemSource 与 ViewModel 绑定,类型为 RadObservableCollection 并声明:

ItemsSource="{Binding HistoryList, Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged,
NotifyOnSourceUpdated=True,
NotifyOnTargetUpdated=True}"

问题是当我向 HistoryList 添加一个新节点然后调用 HistoryList 的 RaisePropertyChange 时,即使添加了数据,RadTreeListView 的 UI 也不会更新。

this.HistoryList.Add(treeViewItem);
this.RaisePropertyChanged(x => x.HistoryList);

然后,如果我使用 RadObservableCollection 的 reset() 方法,UI 会更新,但会浮在视图顶部。所以问题是我该如何处理它?我的意思是我要保持我选择的节点的状态/位置..不跳转或浮动。

该视频让您更好地理解:http ://screencast.com/t/iLa3XWsa

谢谢

4

0 回答 0