如何让 UWP 应用适合屏幕尺寸? [英] How can I make UWP apps fit in the screen size?

查看:26
本文介绍了如何让 UWP 应用适合屏幕尺寸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 84' Microsoft Surface Hub 开发 UWP 应用程序,我根据 Hub 的大小设置每个元素的大小和位置.这带来的问题是,当我在较小的 PC 上运行它时,我无法查看整个应用程序.通过使 UWP 应用程序自动适应屏幕尺寸并始终全屏显示来解决此问题的好方法是什么?提前致谢.

I am developing an UWP application for an 84' Microsoft Surface Hub, and I set the sizes and positions of each element based on the size of the Hub. The problem this brings about is that I cannot view the whole app when I run it on my PC which is smaller in size. What is a good way of fixing this by making the UWP app automatically fit in the screen size, and always display in full screen? Thanks in advance.

推荐答案

这个问题显然太宽泛而无法得到具体的答案,但这里有几个快速提示可以帮助您找到正确的方向

The question is obviously too broad to get a specific answer but here are a couple of quick pointers to get you in the right direction

UWP 中的自适应布局 - https://msdn.microsoft.com/en-us/windows/uwp/layout/design-and-ui-intro

Adaptive layout in UWP - https://msdn.microsoft.com/en-us/windows/uwp/layout/design-and-ui-intro

RelativePanel - https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.relativepanel.aspx

RelativePanel - https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.relativepanel.aspx

自适应触发器 - https:///msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.adaptivetrigger.aspx

您还可以查看 UWP 示例应用以了解自适应布局在实践中的工作原理 - https://github.com/Microsoft/Windows-universal-samples

You can also check the UWP Sample apps to see how Adaptive Layout works in practice - https://github.com/Microsoft/Windows-universal-samples

这篇关于如何让 UWP 应用适合屏幕尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆