Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Screenbox/Controls/ChapterProgressBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

<DataTemplate x:Key="ItemTemplate" x:DataType="viewModels:ChapterViewModel">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of spamming Mode=OneWay I could have just done:

<DataTemplate
    x:Key="ItemTemplate"
    x:DataType="viewModels:ChapterViewModel"
    x:DefaultBindMode="OneWay">

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh I don't know about that. I think explicitly state binding mode still has its merits. I rely on the fact that x:Bind defaults to OneTime quite often. I don't know if implicitly changing the binding mode is a good idea here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it still seems useful in certain situations (like in this one).

<muxc:ProgressBar
Width="{Binding Width}"
Maximum="{Binding Maximum}"
Minimum="{Binding Minimum}"
Width="{x:Bind Width, Mode=OneWay}"
Maximum="{x:Bind Maximum, Mode=OneWay}"
Minimum="{x:Bind Minimum, Mode=OneWay}"
Style="{StaticResource NoAnimationProgressBarStyle}"
Value="{Binding Value}" />
Value="{x:Bind Value, Mode=OneWay}" />
</DataTemplate>

<muxc:StackLayout
Expand Down