multiple ScrollView not working on xamarin forms

HarshitaHarshita INMember ✭✭✭✭

Multiple ScrollView is not working on my content page Xamarin forms.so how to solve this? i added two scrollviiew in my content page,but the second one is not scrolling.

Answers

  • JohnHardmanJohnHardman GBUniversity mod

    @Harshita - Post your code. Is it failing to scroll on Android and iOS and UWP, or just one platform? What version of the XF NuGet are you using?

    Do not nest one ScrollView inside another, if they have the same orientation.

  • ArvindrajaArvindraja INMember ✭✭✭

    @Harshita
    Directly we cant use scrollview inside contentpage for that we need to use another view. Inside those views our scrollview can reside.
    Instead of using multiple scrollview i'll suggest you to use multiple ContentView within scrollview
    like this

    <ScrollView Orientation="Vertical">
       <StackLayout HorizontalOptions="Fill">
         <ContentView>
             <!--put your content here -->
         </ContentView>
    
         <Frame>
             <!--put your content here -->
         </Frame>
    
         <ContentView>
             <!--put your content here -->
         </ContentView>
       </StackLayout>
    </ScrollView>
    

    and see this

    https://forums.xamarin.com/discussion/70422/how-can-i-have-several-layouts-working-under-a-page

  • JohnHardmanJohnHardman GBUniversity mod

    @Arvindraja - re. "Directly we cant use scrollview inside contentpage" - Yes you can, although only one as a direct child of the ContentPage as the ContentPage has a Content property rather than a Children property.

  • ArvindrajaArvindraja INMember ✭✭✭
    edited December 2017

    @JohnHardman Thank you
    Actually my intention was for using consecutive scroll-view directly in content-page as @Harshita doing.
    Thank you for correcting me. :smile:

Sign In or Register to comment.