2016-02-19 42 views
0

我想在gridview中删除gridviewitem后删除动画效果。 我已编辑ItemContainerStyle如下,但不知道是哪个VisualStates必须改变在GridView中删除GridViewItem之后删除动画效果在Windows商店应用程序中

<GridView SelectionMode="None" Margin="10" AllowNewGroup="True" ScrollViewer.HorizontalScrollBarVisibility="Visible" 
    ScrollViewer.HorizontalScrollMode="Enabled" BeforeDrop="MyGridView_BeforeDrop" 
    Drop="MyGridView_Drop" AllowDrop="True" CanReorderItems="True" 
    CanDragItems="True" IsSwipeEnabled="True" ItemsSource="{Binding}" 
    ItemTemplate="{StaticResource ItemTemplate}" > 

      <GridView.ItemContainerStyle> 
      <Style TargetType="GridViewItem"> 
      <Setter Property="HorizontalContentAlignment" Value="Stretch"/> 
      <Setter Property="VerticalContentAlignment" Value="Stretch"/> 
      <Setter Property="Template"> 
      <Setter.Value> 
      <ControlTemplate TargetType="GridViewItem"> 
      ... 
      </ControlTemplate> 
      </Setter.Value> 
      </Setter> 
      </Style> 
      </GridView.ItemContainerStyle>  
    </GridView> 


回答

1

所以,如果我们通过所有的噪音签出Style template和杂草的路上你应该碰到;

<VisualState x:Name="DraggingTarget"> 
    <Storyboard> 
     <DropTargetItemThemeAnimation TargetName="ContentBorder" /> 
    </Storyboard> 
</VisualState> 

这应该是您的罪魁祸首,你可以拉出或注释掉或任何你想做的事情。文档更好地解释了DropTargetItemThemeAnimation。希望这会有所帮助,祝你周末愉快!

+0

谢谢你的宝贵答案,但它不工作.. 一步之遥我也尝试编辑它的父Gridview的** TransitionCollection **和评论** EntranceThemeTransition **但仍然出现效果 –

+0

嗯不知道我明白,应该是这样。也许分享你的风格模板的版本,所以我们可以仔细看看? –

相关问题