Implement Semantic Zoom without listview, Gridview?

693 Views Asked by At

I am trying to implement Semantic Zoom control but not with listview, Gridview or grouping. My UI has following XAML

ZoomIn

<!--Your ZoomIn view here-->
                <ScrollViewer>
                    <StackPanel>
                        <Grid x:Name="Item1" />
                        <Grid x:Name="Item2" />
                        <Grid x:Name="Item3" />
                        <Grid x:Name="Item4" />
                        <Grid x:Name="Item5" />
                    </StackPanel>
                </ScrollViewer>

ZoomOut

         <!--Your ZoomOut view here-->
            <ScrollViewer>
                <StackPanel>
                    <Image x:Name="ImageItem1" />
                    <Image x:Name="ImageItem2" />
                    <Image x:Name="ImageItem3" />
                    <Image x:Name="ImageItem4" />
                    <Image x:Name="ImageItem5" />
                </StackPanel>
            </ScrollViewer>

On clicking on an image in Zoomout it should take to the corresponding to Grid in Zoomin view.

How can i achieve this? Till now I have implemented Semantic zoom using listview, gridview and grouping.

1

There are 1 best solutions below

0
On BEST ANSWER

It's sloppy to use a control like SemanticZoom for controls it is not intended to use.

Having said that, you can do this:

<SemanticZoom>
    <SemanticZoom.ZoomedInView>
        <GridView>
            <GridView.Header>
                <StackPanel>
                    <TextBlock>One</TextBlock>
                    <TextBlock>Two</TextBlock>
                    <TextBlock>Three</TextBlock>
                </StackPanel>
            </GridView.Header>
        </GridView>
    </SemanticZoom.ZoomedInView>
    <SemanticZoom.ZoomedOutView>
        <GridView>
            <GridView.Header>
                <StackPanel>
                    <TextBlock>Four</TextBlock>
                    <TextBlock>Five</TextBlock>
                    <TextBlock>Six</TextBlock>
                </StackPanel>
            </GridView.Header>
        </GridView>
    </SemanticZoom.ZoomedOutView>
</SemanticZoom>

Best of luck!