Change GridView GroupStyle in VisualState

眉间皱痕 提交于 2019-12-09 06:54:24

What's stopping you from using a different Gridview for Portrait orientation? You can detect the current orientation to hide/show appropriate content, see my blog post for more info on how to do this http://www.zubairahmed.net/?p=1032

I am with @Zubair on this one. If you can make multiple layouts for each orientation you have a better solution overall. You can abstract them into user controls if you like. You can reuse the data templates if you like. But handling both orientation AND monitor scaling in a single layout is a needless over-complexity.

Read this: http://blog.jerrynixon.com/2013/12/the-two-ways-to-handle-orientation-in.html

If you must do it like you are wanting, which I do not recommend, you might look at this solution: http://xaml.codeplex.com/SourceControl/latest#MVA/201311_Blend/XamlSpace/ViewModels/MainPageViewModel.cs You can download the whole project if you like. Again, it's not what I would do.

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