-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Finish ScrollTo implementations for CollectionView on UWP #7509
Conversation
|
||
static bool IsVertical(ScrollViewer scrollViewer) | ||
{ | ||
return scrollViewer.HorizontalScrollMode == ScrollMode.Disabled; |
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.
Note entirely up-to-date with UWP but is this enough to determine with certainty that it's vertical? There is also a VerticalScrollMode, don't we need to use that or at least get that into the equation?
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.
Code looks good, but:
- Build failing on failing unit test? Seems unrelated but weird that it suddenly decides to fail
- Having a quick play with it I found a NRE in the Gallery app.
- Go to the CollectionView -> ScrollTo gallery -> ScrollTo Index (Code, Horizontal List) which is the first option
- Input 42 in Scroll To Index box and click Go
- Now click Advance (nothing happens, although the index in the middle updates)
- Keep clicking Advance until you go past the number of items in the collection and watch the fireworks
Same thing happens on the Vertical list and grid and... which might not be surprising
ff00154
to
c678483
Compare
Rebased on Shane's fixes to the unit tests, should be working now.
Nothing should happen, if the ScrollToPosition is set to MakeVisible, because the next items are already visible.
Yep, IndexOutOfRange issue. Should be fixed now. |
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.
Looks all good now! Just a little conflict that needs resolving :)
…) partially implements xamarin#3172 * Finish ScrollTo implementations for CollectionView on UWP * Fix NRE when attempting to scroll to index greater than source length
…) partially implements xamarin#3172 * Finish ScrollTo implementations for CollectionView on UWP * Fix NRE when attempting to scroll to index greater than source length
Description of Change
Implements missing ScrollTo features for CollectionView on UWP.
Issues Resolved
API Changes
None
Platforms Affected
Behavioral/Visual Changes
None
Before/After Screenshots
Not applicable
Testing Procedure
In Control Gallery, navigate to CollectionView Gallery -> ScrollTo Gallery and run everything.
PR Checklist