且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以将 WPF 控件绑定到字段的属性吗?

更新时间:2022-06-05 02:56:42

不,你不能.因为绑定系统使用反射来查找

No you cant . Because binding system uses Reflection to find the

DataContext 中的属性(即您的虚拟机)

Property in DataContext(i.e your VM)

它不寻找 fields .我希望这会有所帮助.

It does not look for fields . I hope this will help.