refactor: chapter control progress bar bindings
If I remember correctly, I used Bindings here for a reason. When I last tested this, there were some edge cases where ItemRepeater and x:Bind don't play nice together. Did you encounter any issues in your testing?
No, but I haven't tested it extensively. Just a couple of files with chapters. But now that I know you've run into issues, I'll test it with a few more.
If I remember correctly, I used Bindings here for a reason. When I last tested this, there were some edge cases where ItemRepeater and x:Bind don't play nice together. Did you encounter any issues in your testing?
Can confirm. Works correctly for the first file in a session, but subsequent files incorrectly applies the Value to some chapters.
The ItemsRepeater also isn't properly clearing the list. While replacing it with an ItemsControl would resolve both this issue and the previous one, it introduces a regression (increasing the Spacing will cause value misalignment in some files).
<ItemsControl ItemTemplate="{StaticResource ItemTemplate}" ItemsSource="{x:Bind ProgressItems}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" Spacing="1" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>