Wpf XML treeview更新问题 [英] Wpf XML treeview update problem

查看:73
本文介绍了Wpf XML treeview更新问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我有一个绑定到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...

推荐答案

我试过这个 - 这不能用作绑定是XmlElement本身而不是名称
I have tried this - this doesn't work as the binding is to the XmlElement itself and not "Name"


这篇关于Wpf XML treeview更新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆