我有一個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