locked
Can I forbidden Gridview selection animation ?

    Question

  •  

    When I select a item in gridview, There is a animation(the item become smaller,and then bigger).

    Q:Is there any way to forbidden this animation

    Purpose: When user tap a item ,No interaction occurs(no animation);

    Thanks

    Friday, March 30, 2012 1:42 AM

All replies

  • This would frustrate your users and would  violate the Metro style app guidelines to always provide feedback to the user. Why do you want to do this? What are you trying to achieve?

    --Rob

     
    Friday, March 30, 2012 8:14 PM
    Owner
  • What I want is that user only can read the content ,But they can't interact with Gridview Item.

    My Purpose: when I have many Items, The GridView has pre-load size ,So memory can be lower.

    Sunday, April 1, 2012 2:15 AM
  • What about setting the IsEnabled property to false? Will that achieve what you need?

    Rebecca M. Riordan

    Sunday, April 1, 2012 4:13 PM
  • You can do that in Blend (or in Visual Studio but its quite complicated).  You must create new style for GridViewItem where you will delete animation which is triggered after click.

    In Blend you can do that usign this: Right click on GridViewItem -> Edit template -> Edit a copy then you can View code (Right click -> view code) there will be new template generated (in Page.Resources)for GridViewItem in which you must delete or comment out <TabDownThemeAnimation .. line.

                        <VisualState x:Name="Pressed">
                            <Storyboard>
                                <TapDownThemeAnimation TargetName="ContentContainer" />
                            </Storyboard>
                        </VisualState>

    Then you must apply that template to GridViewItem using this:

    <GridViewItem Template="{StaticResource YourNewCustomTemplate}">

    • Proposed as answer by Pesha Tuesday, April 3, 2012 5:01 PM
    Monday, April 2, 2012 7:59 PM