Two layouts for two aspect ratios (4:3 and 16:9) - changing automatically

隐身守侯 提交于 2019-12-23 11:44:11

问题


Following the Microsoft scale guidelines there is a part where it says:

When designing a fixed layout, start by designing your layout for the baseline resolutions: 1024x768 and 1366x768.

Regarding this I have the following question:

Is it possible to define two fixed layouts for two aspect ratios (both to be used with the ViewBox to scale to every resolution in that aspect ratio) so they can change automatically depending on the screen's aspect ratio? And maybe change between the fill mode and full screen mode that also changes aspect ratios ?


回答1:


Project Templates comes with LayoutAwarePage that provides visual states you can use to change layout according to ApplicationView (Filled, Snapped etc...) If needed you could extend that behavior there overriding InvalidateVisualState.



来源:https://stackoverflow.com/questions/13843213/two-layouts-for-two-aspect-ratios-43-and-169-changing-automatically

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