Bug 56947

Summary: macOS: ScrollView's content are showing at End.
Product: Forms Reporter: Brad Chase <xsirxx>
Component: FormsAssignee: Rui Marinho <rui.marinho>
Status: RESOLVED FIXED    
Severity: normal CC: jas, paul.dipietro
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Tags: Is this bug a regression?: ---
Last known good build:

Description Brad Chase 2017-05-29 19:49:50 UTC
ScrollView set to vertical on macOS are showing at the bottom of the scroll's contents rather than where the child is stating it should be located.

To repro, take a scroll view set to fill, set to vertical, add child with vertical set to start.  It will show at the bottom of the scrollview.
Comment 1 Brad Chase 2017-05-30 00:27:51 UTC
After playing with it a bit I found that wrapping the ContentView in a new NSView and setting that view's size will get the correct layout.

I can put up that change if you guys would like but there are other issues that I believe are causing the problem.  So even if wrapping fixes it, there are other problems that still need solved.

For instance if you resize the screen the scroll view will never go back to its original spot unless you change the horizontal size of the screen.

For testing I wanted to make sure that End alignment still worked and found that with the new and original code, it renders half way off screen.  So that will still need fixed.

That means that the other problems are all there with the original code.  So wrapping it will fix THIS bug but will not fix the others.  I can spend some more time and investigate but I am new to the macOS layout system.  I can also put a PR up.  Its up to you guys.
Comment 2 Brad Chase 2017-05-30 00:39:10 UTC
Also wanted to add that the ContentView's IsFlipped is set to false.
Comment 3 Brad Chase 2017-06-12 22:06:52 UTC
I should have a PR up tomorrow with the fix.
Comment 4 Brad Chase 2017-06-14 20:59:44 UTC
Link back to the PR for reference and discussion:

https://github.com/xamarin/Xamarin.Forms/pull/993

And I do welcome discussion on this.  I hope there is an easier way of fixing this but I could not find one and I exhausted my research into how macOS behaves with the ScrollView.  I believe most of the issues are in Xamarin's layout code fighting with macOS's inverted layout code.  Any better ideas would be really appreciated.

As far as that goes, if we never update Xamarin's ScrollViewer, this is easily fixed with very minimal code.  But we cant do that.
Comment 5 Rui Marinho 2017-06-21 15:50:13 UTC
Should be fixed on 2.3.6-pre1