1
votes

I am working on a cross-platform app in Xamarin.Forms. Here is the layout of ContentPage:

    <ContentPage.Content>
        <ScrollView x:Name="svMarket">
          <AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                <StackLayout Orientation="Vertical" HorizontalOptions="StartAndExpand">
                </StackLayout>
                <StackLayout x:Name="overLay" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All" IsVisible="false" BackgroundColor="#C0808080">
                </StackLayout>
            </AbsoluteLayout>
        </ScrollView>
    </ContentPage.Content>

The content is added at run-time and the page can get very long. Scrollview lets us scroll only for small part of the page and the rest of the content on page is not visible. This problem only occurs in iOS version. It works alright when tested on android.

Second stacklayout works only as an overlay. There are a number of grid controls inside the first stacklayout and the content is added inside grids.

1
Did you find a solution ? I am facing similar issue.b.g
Check the answerAli R.

1 Answers

1
votes

I figured it out. The xamarin was calculating total size of gridview from the size of its rows. And whenever gridview rows has a long strings in cells that made those take two lines, the size calculation messes up. So to solve it either the string needs to be trimmed or the size calculation can be done manually.

We went with the first solution. Not sure if second will even work or not.