Windows Store App: Eliminates GridView styles and use only for hub page layout

ⅰ亾dé卋堺 提交于 2019-12-24 01:51:26

问题


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 :

  1. right click on your grid
  2. go to Edit Additional Template
  3. click on 'Edit Generated Item Container(ItemContainerStyle)' > 'Edit a Copy...'
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!