は、私は次のXAMLいる:結合に使用MVVM /のObservableCollection質問
<Grid x:Name="LayoutRoot">
<sdk:DataGrid AutoGenerateColumns="True" Margin="46,38,0,40" x:Name="FamilyListGrid" HorizontalAlignment="Left" Width="475"
ItemsSource="{Binding FamilyList}"
SelectedItem="{Binding SelectedFamily, Mode=TwoWay}" />
</Grid>
マイFamilyListプロパティは、私の見解モデルクラス内のエンティティののObservableCollectionです。私は私のFamilyListコレクションのセッターでINotifyPropertyChangedを実装する必要があることがわかっています。バインディングは機能しません。 ObservableCollectionが既にこれを実装していることは私の理解であった。このような場合は、なぜnotifyプロパティを実装する必要がありますか?
それが助け場合は、ここに私のFamilyListプロパティの定義です:
private ObservableCollection<Services.Family> familyList;
public ObservableCollection<Services.Family> FamilyList
{
get { return familyList; }
private set
{
familyList = value;
NotifyPropertyChanged("FamilyList");
}
}