Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How in CarouselPage to divide ContentPage into different files?

In one xaml file I have a carousel. Starting from the second section, the code for the next page is also listed here. For compactness I would like to make as partial applications in asp.net. Is it possible to split the Contentpage into different files for each page for greater convenience? Thanks !

  <CarouselPage  xmlns="http://xamarin.com/schemas/2014/forms"
     xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
     xmlns:d="http://xamarin.com/schemas/2014/forms/design">
<ContentPage
    BackgroundImage="background">
   <ContentPage.Content>
    <StackLayout>
    <Image  
        Source="logo">
    </Image>
    <Frame>
        <local:SearchProfile
        Keyboard="Default">
        </local:SearchProfile>
    </Frame>
    <Image 
        Source="starttext">
    </Image>
</StackLayout>
</ContentPage.Content>
</ContentPage>

 <ContentPage>
    <ContentPage.Content>
    <StackLayout>
        <Image Source="map"></Image>
    </StackLayout>
    </ContentPage.Content>
 </ContentPage>
like image 949
Gen Ts Avatar asked Jan 04 '20 13:01

Gen Ts


1 Answers

You can’t have multiple pages in one page. You can only have multiple layouts inside a page.

The CarouselPage can’t have a ContentPage inside it and vice versa. However the CarouselPage can have multiple layouts in it (Stack, Relative, Absolute, Frame, Grid)

Here's a quick snippet explaining Pages vs Layouts.

like image 131
Saamer Avatar answered Jan 03 '23 16:01

Saamer