PropertyChangedを起動するプロパティは次のとおりです。
public override List<Tag> Tags
{
get
{
return base.Tags;
}
set
{
if (base.Tags != value) {
base.Tags = value;
if (PropertyChanged != null)
{
PropertyChanged(this,
new PropertyChangedEventArgs("Tags"));
PropertyChanged(this,
new PropertyChangedEventArgs("TotalTagPages"));
PropertyChanged(this,
new PropertyChangedEventArgs("PageHasTags"));
}
}
}
}
CurrentPage.Tagsが変更されると、このコントロールは正しく更新されます。
<TextBlock DockPanel.Dock="Bottom" Name="TagHeader"
Text="{Binding CurrentPage.Tags,
Converter={converter:EnumerableToSpacedString}}"
Foreground="White" />
これは、CurrentPage.Tagsが変更されたときに更新されませんが、CurrentPage自体が変更されたときに更新されます。
<ListBox VerticalAlignment="Top"
Style="{StaticResource DarkListBox}"
ItemTemplate="{StaticResource TagTemplateNoCounts}"
ItemsSource="{Binding CurrentPage.Tags}" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"></StackPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
何か案は?