简体   繁体   中英

Add Panorama Item to Panorama Page

By default when you setup a panorama page on windows phone it gives me 2 pages "item one" and "item two" and I can scroll between these pages. But when I try and manually add another page (item 3) it doesn't scroll through a 3rd page instead it just sits on top of item1 and I cannot move it at all.

this is what the Visual studio template gives you:

        <!--Panorama item one-->
        <controls:PanoramaItem Header="item1">
            <Grid/>
        </controls:PanoramaItem>

        <!--Panorama item two-->
        <controls:PanoramaItem Header="item2">
            <Grid/>
        </controls:PanoramaItem>
    </controls:Panorama>
</Grid>

Is it possible to have over 2 panorama pages through XAML?

-Thanks

By pages here you mean PanoramaItems, Yes you can have multiple PanoramaItems.

<Grid x:Name="LayoutRoot">
    <phone:Panorama Title="my application">

        <!--Panorama item one-->
        <phone:PanoramaItem Header="item1">
            <Grid/>
        </phone:PanoramaItem>

        <!--Panorama item two-->
        <phone:PanoramaItem Header="item2">
            <Grid/>
        </phone:PanoramaItem>

        <phone:PanoramaItem Header="item3">
            <Grid/>
        </phone:PanoramaItem>

        <phone:PanoramaItem Header="item4">
            <Grid/>
        </phone:PanoramaItem>
    </phone:Panorama>
</Grid>

Also read this Panorama Design Guideline for more details

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM