问题
I try to make a Windows Store App (Metro) hub page which has four different templates with GridView.
I referenced link in Creating hub page with different controls in Windows 8 page and it works fine.
But GridView has a default style which interacts with touch(and mouse) activity. It grayed when hover, and shows click interaction.
My question is, how to disable those behaviors? I tried to dig with Blend but hard to find the place to be customized.
回答1:
Sorry I don't know MS Blend
But in visual studio please follow below instruction :
- right click on your grid
- go to Edit Additional Template
- click on 'Edit Generated Item Container(ItemContainerStyle)' > 'Edit a Copy...'
go to XAML code and remove the PointerOver content from your code. the code should be like the following
//some code here <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"/> <VisualState x:Name="PointerOverPressed"/> <VisualState x:Name="Disabled"> //continue
来源:https://stackoverflow.com/questions/13795937/windows-store-app-eliminates-gridview-styles-and-use-only-for-hub-page-layout