【发布时间】:2010-05-28 21:05:50
【问题描述】:
所以,我找到了一种将标签绑定到当前控件上的属性的方法
我给它起个名字:
<UserControl x:Class="WpfGridtest.GridControl" x:Name="GridControlControl1">
然后绑定到这个控件的属性:
<Label Content="{Binding ElementName=GridControlControl1, Path=Filter}"></Label>
我可以看到我放入该属性的默认值。
我猜这不起作用,因为我绑定到未实现 INotifyPropertyChanged 的 String 属性?
我是否应该为此属性使用其他类型,而不是 String 自动通知我的更改标签,或者我是否以错误的方式进行此操作?
【问题讨论】:
标签: wpf binding inotifypropertychanged