简体   繁体   English

WinRT XAML中的ViewPort等效于什么?

[英]What's the equivalent of ViewPort in WinRT XAML?

What would be the equivalent to the following line of code, but in XAML? 在XAML中,与以下代码行等效吗?

<meta name="viewport" content="width=device-width; initial-scale=1.0; user-scalable=false;">

I want my app to be portable and be "good enough" to look regardless of the user's monitor. 我希望我的应用程序具有可移植性,并且“足够好”以使其外观与用户的显示器无关。 At the same time I am not keen on spending too much time on targeting diverse screen resolution that deviates from norm. 同时,我不希望花太多时间针对偏离标准的多种屏幕分辨率。

Is there a way to simply scale the content of an XAML app like I could a web app? 有没有办法像Web应用程序一样简单地扩展XAML应用程序的内容?

There is no direct equivalent. 没有直接的对等物。 In some Scenarios, Viewbox is a good replacement. 在某些情况下, Viewbox是很好的替代品。 But in my opinion you should reconsider your approach because it won't be "good enough", especially when dealing with touch and touch target sizes . 但是我认为您应该重新考虑您的方法,因为这种方法“不够好”,尤其是在处理触摸和触摸目标尺寸时 You may also encounter usability issues when the user wants to use your app side by side with other apps (split screen). 当用户想要与其他应用程序(分屏)并排使用您的应用程序时,您可能还会遇到可用性问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM