1

我看过的所有 SemanticZoom 示例都涉及在缩小视图上以这种方式链接到数据源,当您单击一个类别时,它会缩放到放大视图上的正确位置。

我的问题是我不显示数据只是由几个包含文本框和文本块的网格组成的界面。

我已经让 SemanticZoom 在视觉上工作,但是当我在缩小视图上选择一个类别时,它总是把我带到放大视图的开头。

我知道它正在这样做,因为缩小视图中没有参考告诉它去哪里,但我不知道我必须添加什么才能使它工作。我的 XAML 下面很长:

 <SemanticZoom Grid.Row="1">
        <SemanticZoom.ZoomedInView>
    <GridView  IsRightTapEnabled="False" IsTapEnabled="False" IsHoldingEnabled="False" SelectionMode="None">


                    <!-- Length Input Area -->
        <Grid Margin="70,0,70,0" Background="#FFBFFFD9" Width="320" Height="545" IsDoubleTapEnabled="False" IsHoldingEnabled="False" IsRightTapEnabled="False">
               <Grid.ColumnDefinitions>
                    <ColumnDefinition Width ="*"/>
                    <ColumnDefinition Width ="*"/>
               </Grid.ColumnDefinitions>
               <Grid.RowDefinitions>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>

                </Grid.RowDefinitions>

                Various Text Boxes and Textblocks                   
            </Grid>

            <!-- Weight Input Area -->
                <Grid Margin="0,0,70,0" Background="#FFC7D6FF" Width="320" Height="545">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width ="*"/>
                    <ColumnDefinition Width ="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>

                </Grid.RowDefinitions>

                 Various Text Boxes and Textblocks                      </Grid>

            <!-- Speed Input Area -->
                <Grid Margin="0,0,70,0" Background="#FFF0B2BA" Width="320" Height="545">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width ="*"/>
                    <ColumnDefinition Width ="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>

                </Grid.RowDefinitions>

                 Various Text Boxes and Textblocks                    </Grid>

            <!-- Area Input Area -->
                <Grid Margin="0,0,70,0" Background="#FFFFFBB0" Width="320" Height="545">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width ="*"/>
                    <ColumnDefinition Width ="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>

                </Grid.RowDefinitions>

                Various Text Boxes and Textblocks                    </Grid>

            <!-- Volume Input Area -->
                <Grid Margin="0,0,70,0" Background="#FFFFD9A2" Width="320" Height="545">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width ="*"/>
                    <ColumnDefinition Width ="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>

                </Grid.RowDefinitions>

                 Various Text Boxes and Textblocks                    </Grid>

            <!-- Fuel Input Area -->
                <Grid Margin="0,0,70,0" Width="320"  Height="545" Background="#FFAA9C9B">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width ="*"/>
                    <ColumnDefinition Width ="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>

                </Grid.RowDefinitions>

                Various Text Boxes and Textblocks    
            </Grid>

            <!-- Pressure Input Area -->
                <Grid Margin="0,0,0,0" Width="320" Background="#FFB9F8FB" Height="545">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width ="*"/>
                    <ColumnDefinition Width ="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>
                    <RowDefinition Height="50"/>

                </Grid.RowDefinitions>

                Various Text Boxes and Textblocks    
            </Grid>

    </GridView>

        </SemanticZoom.ZoomedInView>

        <SemanticZoom.ZoomedOutView>
             <GridView  Margin="100,0,0,0"  Height="300" IsRightTapEnabled="False" IsTapEnabled="False" IsHoldingEnabled="False" SelectionMode="None">

                    <!-- Length Input Area -->
                    <Grid Margin="0,0,0,0" Background="#FFBFFFD9" Width="150" Height="245" IsDoubleTapEnabled="False" IsHoldingEnabled="False" IsRightTapEnabled="False">


                <TextBlock TextWrapping="Wrap" Text="Length" Style="{StaticResource PageHeaderTextStyle}" Margin="10,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" FontSize="40"/>
         </Grid>

            <!-- Weight Input Area -->
                <Grid Margin="0,0,0,0" Background="#FFC7D6FF" Width="150" Height="245">


                <TextBlock TextWrapping="Wrap" Text="Weight" Style="{StaticResource PageHeaderTextStyle}" Margin="10,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" FontSize="40"/>
     </Grid>

            <!-- Speed Input Area -->
                <Grid Margin="0,0,0,0" Background="#FFF0B2BA" Width="150" Height="245">


                <TextBlock TextWrapping="Wrap" Text="Speed" Style="{StaticResource PageHeaderTextStyle}" Margin="10,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" FontSize="40"/>
       </Grid>

            <!-- Area Input Area -->
                <Grid Margin="0,0,0,0" Background="#FFFFFBB0" Width="150" Height="245">


                <TextBlock TextWrapping="Wrap" Text="Area" Style="{StaticResource PageHeaderTextStyle}" Margin="10,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" FontSize="40"/>
         </Grid>

            <!-- Volume Input Area -->
                <Grid Margin="0,0,0,0" Background="#FFFFD9A2" Width="150" Height="245">


                <TextBlock TextWrapping="Wrap" Text="Volume" Style="{StaticResource PageHeaderTextStyle}" Margin="10,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" FontSize="40"/>
        </Grid>

            <!-- Fuel Input Area -->
                <Grid Margin="0,0,0,0" Width="150"  Height="245" Background="#FFAA9C9B">


                <TextBlock TextWrapping="Wrap" Text="Fuel" Style="{StaticResource PageHeaderTextStyle}" Margin="10,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" FontSize="40"/>

            </Grid>

            <!-- Pressure Input Area -->
                <Grid Margin="0,0,0,0" Width="150" Background="#FFB9F8FB" Height="245">


                <TextBlock TextWrapping="Wrap" Text="Pressure" Style="{StaticResource PageHeaderTextStyle}" Margin="8,10,0,0" VerticalAlignment="Top" Grid.ColumnSpan="2" FontSize="40"/>

            </Grid>

    </GridView>
        </SemanticZoom.ZoomedOutView>
    </SemanticZoom>
4

0 回答 0