简体   繁体   中英

What's the equivalent of ViewPort in WinRT XAML?

What would be the equivalent to the following line of code, but in 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?

There is no direct equivalent. In some Scenarios, Viewbox is a good replacement. 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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