问题描述
按照 Microsoft规模指南,上面写着的部分:
Following the Microsoft scale guidelines there is a part where it says:
对此,我有以下问题:
是否可以为两个长宽比定义两个固定的布局(两者都与ViewBox
一起使用以按该长宽比缩放至每个分辨率),以便它们可以根据屏幕的长宽比自动更改?也许在填充模式和全屏模式之间切换,这也会改变长宽比?
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 ?
推荐答案
LayoutAwarePage随附项目模板,该模板提供可视状态,可用于根据ApplicationView更改布局(填充,捕捉等).如果需要,可以扩展该外观覆盖InvalidateVisualState的行为.
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.
这篇关于两种宽高比(4:3和16:9)的两种布局-自动更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!