我有一个GridView是我定义了一些列的,是这样的...WPF通知变动对对象
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding MyProp}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
我我的GridView控件绑定到一个集合,implemts在属性MyProp INotifyPropertyChanged的。这效果很好,MyProp的任何变化都反映到gridview中。
如果我添加另一列绑定到对象本身,我没有得到任何通知/更新。我的代码...
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource myConverter}}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
我想我需要像INotifyPropertyChanged这样的对象,但我不知道如何做到这一点。有什么建议么?
非常感谢,这是我需要的激动人心的。 – 2010-05-27 07:17:28