问题描述
你好,
我有一个绑定到XmlDataProvider的WPF TreeView。当我添加一个新孩子时,树视图会自动更新:
xmldocument.SelectSingleNode(SW / AnyJobs)。AppendChild(newChild);
但是,当我更改绑定到TreeView Header的转换器的属性时,不会发生更新:
xmldocument。 SelectSingleNode(SW / AnyJobs)。LastChild.SetAttribute(Name,1234);
有没有人有建议?
提前致谢!
我的尝试:
我尝试了很多事情没有成功...
Hello,
I have a WPF TreeView bound to an XmlDataProvider. When I add a new child the treeview is automatically updated:
xmldocument.SelectSingleNode("SW/AnyJobs").AppendChild(newChild);
However, when i change an attribute which is bound to a converter for the TreeView Header, no update occurs:
xmldocument.SelectSingleNode("SW/AnyJobs").LastChild.SetAttribute("Name", "1234");
Does anyone have a suggestion?
Thanks in advance!
What I have tried:
I have tried a number of things without success...
推荐答案
这篇关于Wpf XML treeview更新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!