CarouselPage 中如何将 ContentPage 分成不同的文件?

Gen*_* Ts 6 xamarin.ios xamarin.android xamarin xamarin.forms

在一个 xaml 文件中,我有一个轮播。从第二部分开始,这里也列出了下一页的代码。为了紧凑,我想在 asp.net 中作为部分应用程序。为了更方便,是否可以将 Contentpage 拆分为每个页面的不同文件?谢谢 !

  <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>
Run Code Online (Sandbox Code Playgroud)

Saa*_*mer 3

您可以\xe2\x80\x99t 在一页中包含多个页面。一个页面内只能有多个布局。

\n\n

CarouselPage 内部可以\xe2\x80\x99t 包含ContentPage,反之亦然。然而 CarouselPage 可以有多种布局(Stack、Relative、Absolute、Frame、Grid)

\n\n

这是解释页面与布局的快速片段快速片段。

\n