-
Couldn't load subscription status.
- Fork 2.5k
Fix for FlipView : Navigation's button visibility and Transition update #2750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…l's orientation changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for fixing this. Can you look at my 2 comments?
| return CoerceSelectedIndexProperty(d, value); | ||
| } | ||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add more documentation what this code does?
| Minimum="1" | ||
| Maximum="{Binding Path=Items.Count, Mode=OneWay}" | ||
| Value="{Binding Path=SelectedIndex, Mode=TwoWay, Converter={vc:Int32IndexToNumberConverter}}"/> | ||
| <TextBlock VerticalAlignment="Center" Margin="8 0 0 0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not starting from 0? Then you don't need the Int32IndexToNumberConverter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're absolutely right.
It's just that users tend to prefer message 'Viewing item 1 on 2' than 'Viewing item 0 on 1'.
Hence the shift of 1.
|
Here you are, i added a detail explanation of the coercion trick. |
|
@jumulr why closed? |
|
Mistake, sorry. Is that ok ? |
Refresh navigation buttons' visibility when control's orientation changes.
Handle navigation buttons' visibility when toggling their display.
Apply transition when SelectedIndex changes.