2014-10-02 1 views
0

SemanticZoom 내에서 ListView를 사용하는 데 문제가 있습니다. 설명하기는 어렵지만 왼쪽에 ListView를 "접착"할 수 없습니다.Semanticzoom 내 목록보기

SemanticZoom 내에서 ListView를 사용하면 ListView를 손가락으로 움직일 수 있습니다. 시맨틱 줌 기능이 없으면 왼쪽으로 움직이지 않습니다.

복제 :

  • 이 SemanticZoom을 만들고 ZoomedInView는
  • 실행 ListViewItems의 무리와 함께있는 ListView를 만들 whitin 시도 (내 경우 범용 앱에서) 새 Windows 스토어 응용 프로그램 만들기 손가락
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> 
    <SemanticZoom HorizontalAlignment="Left"> 
     <SemanticZoom.ZoomedInView> 
      <ListView Width="600" HorizontalAlignment="Left" > 
       <ListViewItem>Hello World</ListViewItem> 
       <ListViewItem>Hello World</ListViewItem> 
       <ListViewItem>Hello World</ListViewItem> 
       <ListViewItem>Hello World</ListViewItem> 
      </ListView> 
     </SemanticZoom.ZoomedInView> 
     <SemanticZoom.ZoomedOutView> 
      <GridView /> 
     </SemanticZoom.ZoomedOutView> 
    </SemanticZoom> 
</Grid> 

설정 번째로 주위의 목록보기 이동 ManipulationMode를 "None"으로 설정하면 왼쪽에서 오른쪽으로 만 이동하지만 왼쪽으로는 이동하지 않습니다. 사전에

감사합니다, 릭

답변

0

이 문제가 SemanticZoom 문제 것 같다. 빠른 http://poniaten.wordpress.com/2014/04/14/how-to-fix-scroll-in-semantic-zoom-zoom-out/

: 나는에 대한 해결책을 발견

  <Style TargetType="SemanticZoom"> 
      <Setter Property="Padding" Value="3"/> 
      <Setter Property="Background" Value="Transparent"/> 
      <Setter Property="BorderThickness" Value="0"/> 
      <Setter Property="IsTabStop" Value="False"/> 
      <Setter Property="TabNavigation" Value="Once"/> 
      <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Enabled"/> 
      <Setter Property="ScrollViewer.IsHorizontalRailEnabled" Value="False"/> 
      <Setter Property="ScrollViewer.VerticalScrollMode" Value="Disabled"/> 
      <Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="False"/> 
      <Setter Property="Template"> 
       <Setter.Value> 
        <ControlTemplate TargetType="SemanticZoom"> 
         <Grid> 
          <VisualStateManager.VisualStateGroups> 
           <VisualStateGroup x:Name="SemanticZoomStates"> 
            <VisualState x:Name="ZoomInView"> 
             <Storyboard> 
              <FadeOutThemeAnimation TargetName="ZoomedOutPresenter"/> 
              <FadeInThemeAnimation TargetName="ZoomedInPresenter"/> 
             </Storyboard> 
            </VisualState> 
            <VisualState x:Name="ZoomOutView"> 
             <Storyboard> 
              <FadeOutThemeAnimation TargetName="ZoomedInPresenter"/> 
              <FadeInThemeAnimation TargetName="ZoomedOutPresenter"/> 
             </Storyboard> 
            </VisualState> 
           </VisualStateGroup> 
           <VisualStateGroup x:Name="ZoomOutButtonStates"> 
            <VisualStateGroup.Transitions> 
             <VisualTransition From="ZoomOutButtonVisible" To="ZoomOutButtonHidden"> 
              <Storyboard BeginTime="0:0:3"> 
               <FadeOutThemeAnimation TargetName="ZoomOutButton"/> 
               <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="ZoomOutButton"> 
                <DiscreteObjectKeyFrame KeyTime="0"> 
                 <DiscreteObjectKeyFrame.Value> 
                  <x:Boolean>False</x:Boolean> 
                 </DiscreteObjectKeyFrame.Value> 
                </DiscreteObjectKeyFrame> 
               </ObjectAnimationUsingKeyFrames> 
              </Storyboard> 
             </VisualTransition> 
            </VisualStateGroup.Transitions> 
            <VisualState x:Name="ZoomOutButtonVisible"> 
             <Storyboard> 
              <FadeInThemeAnimation TargetName="ZoomOutButton"/> 
             </Storyboard> 
            </VisualState> 
            <VisualState x:Name="ZoomOutButtonHidden"> 
             <Storyboard> 
              <FadeOutThemeAnimation TargetName="ZoomOutButton"/> 
              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="ZoomOutButton"> 
               <DiscreteObjectKeyFrame KeyTime="0"> 
                <DiscreteObjectKeyFrame.Value> 
                 <x:Boolean>False</x:Boolean> 
                </DiscreteObjectKeyFrame.Value> 
               </DiscreteObjectKeyFrame> 
              </ObjectAnimationUsingKeyFrames> 
             </Storyboard> 
            </VisualState> 
           </VisualStateGroup> 
          </VisualStateManager.VisualStateGroups> 
          <ScrollViewer x:Name="ScrollViewer" HorizontalScrollMode="Disabled" HorizontalContentAlignment="Center" HorizontalScrollBarVisibility="Hidden" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsScrollInertiaEnabled="True" IsZoomChainingEnabled="True" IsZoomInertiaEnabled="False" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" MinZoomFactor="0.5" MaxZoomFactor="1.0" VerticalScrollBarVisibility="Hidden" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" VerticalContentAlignment="Center" ZoomMode="Enabled"> 
           <ScrollViewer.Template> 
            <ControlTemplate TargetType="ScrollViewer"> 
             <ScrollContentPresenter x:Name="ScrollContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/> 
            </ControlTemplate> 
           </ScrollViewer.Template> 
           <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" RenderTransformOrigin="0, 0"> 
            <Border.RenderTransform> 
             <CompositeTransform x:Name="ManipulatedElementTransform"/> 
            </Border.RenderTransform> 
            <Grid Margin="{TemplateBinding Padding}"> 
             <ContentPresenter x:Name="ZoomedInPresenter" Content="{TemplateBinding ZoomedInView}" IsHitTestVisible="False" RenderTransformOrigin="0.5, 0.5" Visibility="Collapsed"> 
              <ContentPresenter.RenderTransform> 
               <CompositeTransform x:Name="ZoomedInTransform"/> 
              </ContentPresenter.RenderTransform> 
             </ContentPresenter> 
             <ContentPresenter x:Name="ZoomedOutPresenter" Content="{TemplateBinding ZoomedOutView}" IsHitTestVisible="False" RenderTransformOrigin="0.5, 0.5" Visibility="Collapsed"> 
              <ContentPresenter.RenderTransform> 
               <CompositeTransform x:Name="ZoomedOutTransform"/> 
              </ContentPresenter.RenderTransform> 
             </ContentPresenter> 
            </Grid> 
           </Border> 
          </ScrollViewer> 
          <Button x:Name="ZoomOutButton" HorizontalAlignment="Right" IsTabStop="False" Margin="0,0,7,24" VerticalAlignment="Bottom"> 
           <Button.Template> 
            <ControlTemplate TargetType="Button"> 
             <Border x:Name="Root" BorderBrush="{StaticResource SemanticZoomButtonBorderThemeBrush}" BorderThickness="1" Background="{StaticResource SemanticZoomButtonBackgroundThemeBrush}" Height="21" Width="21"> 
              <VisualStateManager.VisualStateGroups> 
               <VisualStateGroup x:Name="NormalStates"> 
                <VisualState x:Name="Normal"/> 
                <VisualState x:Name="PointerOver"> 
                 <Storyboard> 
                  <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Root"> 
                   <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SemanticZoomButtonPointerOverBackgroundThemeBrush}"/> 
                  </ObjectAnimationUsingKeyFrames> 
                  <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Root"> 
                   <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SemanticZoomButtonPointerOverBorderThemeBrush}"/> 
                  </ObjectAnimationUsingKeyFrames> 
                  <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Glyph"> 
                   <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SemanticZoomButtonPointerOverForegroundThemeBrush}"/> 
                  </ObjectAnimationUsingKeyFrames> 
                 </Storyboard> 
                </VisualState> 
                <VisualState x:Name="Pressed"> 
                 <Storyboard> 
                  <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Root"> 
                   <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SemanticZoomButtonPressedBackgroundThemeBrush}"/> 
                  </ObjectAnimationUsingKeyFrames> 
                  <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Root"> 
                   <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SemanticZoomButtonPressedBorderThemeBrush}"/> 
                  </ObjectAnimationUsingKeyFrames> 
                  <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="Glyph"> 
                   <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SemanticZoomButtonPressedForegroundThemeBrush}"/> 
                  </ObjectAnimationUsingKeyFrames> 
                 </Storyboard> 
                </VisualState> 
               </VisualStateGroup> 
              </VisualStateManager.VisualStateGroups> 
              <TextBlock x:Name="Glyph" Foreground="{StaticResource SemanticZoomButtonForegroundThemeBrush}" FontSize="{StaticResource SemanticZoomButtonFontSize}" FontFamily="{StaticResource SymbolThemeFontFamily}" HorizontalAlignment="Center" IsHitTestVisible="False" Margin="0,0,0,1" Text="" UseLayoutRounding="False" VerticalAlignment="Center"/> 
             </Border> 
            </ControlTemplate> 
           </Button.Template> 
          </Button> 
         </Grid> 
        </ControlTemplate> 
       </Setter.Value> 
      </Setter> 
     </Style> 
: 당신은 SemanticZoom을 위해 다음과 같은 스타일이 필요합니다