vijay.k
vijay.k

Reputation: 179

remove animation effect after drop GridViewItem in GridView in Windows store apps

I want to remove the animation effect after drop the gridviewitem in gridview. I have edited the ItemContainerStyle as follows, but don't know which VisualStates has to be change

  <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>


Upvotes: 0

Views: 59

Answers (1)

Chris W.
Chris W.

Reputation: 23290

So if we go check out a Style template and weed our way through all the noise you should come across;

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

That should be your culprit you can pull out or comment out or whatever you want to do. DropTargetItemThemeAnimation is better explained by the docs. Hope this helps, have a great weekend!

Upvotes: 1

Related Questions