user1676682
user1676682

Reputation: 381

Putting multiple ContentViews in a ScrollView

I'm making an app with Xamarin.Forms, and I'm trying to make scrolling menu. How would I do this using a ScrollView and multiple ContentViews or Frames? I've actually already succeeded at doing this, but I need to be able to do it using XAML instead. So, how do I do that?

Upvotes: 1

Views: 2657

Answers (1)

eakgul
eakgul

Reputation: 3698

ScrollView should have only one child, so you have to use a layout like Grid or StackPanel etc.

<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>

Upvotes: 1

Related Questions