Here is the property that fires 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"));
}
}
}
}
This control refreshes correctly when CurrentPage.Tags is modified:
<TextBlock DockPanel.Dock="Bottom" Name="TagHeader"
Text="{Binding CurrentPage.Tags,
Converter={converter:EnumerableToSpacedString}}"
Foreground="White" />
This one does NOT refresh when CurrentPage.Tags is changed, but does so when CurrentPage itself is changed:
<ListBox VerticalAlignment="Top"
Style="{StaticResource DarkListBox}"
ItemTemplate="{StaticResource TagTemplateNoCounts}"
ItemsSource="{Binding CurrentPage.Tags}" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"></StackPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Any ideas?
Do not see any reason why that would not work (as opposed to modifying the list, which requires
INotifyCollectionChanged)…