WP8 Pivot inside Panorama

187 views Asked by At

I want to place Pivot inside Panorama and disable horizontal flick gestures for Pivot.

  • If I set IsLocked="True" for Pivot, when I make horizontal flick, Panorama item is not changing.
  • If i set IsHitTestVisible="False" for Pivot, I cant tap anything inside Pivot.

How can make this:

  • Pivot can "sense" Tap and vertical flick gestures
  • Panorama can "sense" horisontal flick gestures
1

There are 1 answers

1
Kasun Kodagoda On

This is not recommended behavior for Windows phone platform. Putting a Pivot inside a Panorama doesn't make sense at all and goes against WP design guidelines. Cant you have the same functionality with Panorama control alone?

Use PanoramaItems as you use PivotItems, if you want vertical scrolling use a ScrollView instead. Doing like you mentioned might make your app not certifiable.

<Grid x:Name="LayoutRoot">
    <phone:Panorama Title="my application">
        <!--Panorama item one-->
        <phone:PanoramaItem Header="item1">
            <Grid>
                <ScrollViewer Height="480">
                    <StackPanel>
                        <Button Content="Button" />
                        <Button Content="Button" />
                        <Button Content="Button" />
                        <Button Content="Button" />
                        <Button Content="Button" />
                        <Button Content="Button" />
                        <Button Content="Button" />
                        <Button Content="Button" />
                        <Button Content="Button" />                                                       
                    </StackPanel>
                </ScrollViewer>
            </Grid>                
        </phone:PanoramaItem>

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

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

With the above Panorama Page you can have horizontal scrolling among PanoramaItems and Vertical Scrolling for the content of the PanoramaItem