[UWP]字体大小自适应 [英] [UWP]Font size adaptive

查看:250
本文介绍了[UWP]字体大小自适应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


大家好,

Hi everybody,

我正在开发通用Windows应用程序。

I'm developing a Universal Windows App.

对于布局我使用了具有百分比行和列的网格,因此它们可以适应和调整各种设备的大小。

For layout I used a grid with rows and columns in percentage, so they can fit and resize to the various devices.

我想用文本做同样的事情。我使用了组合框,文本块,我需要调整文本大小,因为在小型电脑屏幕上文本被剪切。

I wanna do the same thing with text. I used combobox, textblock and I need to resize text, because on small pc screen the text is cut.

有没有办法做到这一点?

Is there a way to do that?

谢谢,

Matteo

推荐答案

Hello Matteo182,

Hello Matteo182,

在UWP中,您可以使用AdaptiveTrigger更改字体大小。使用内置的AdaptiveTrigger作为具有MinWindowHeight和/或MinWindowWidth属性的VisualState的StateTrigger,可视状态可以根据应用程序窗口的高度/宽度进行更改。

In UWP, you could use AdaptiveTrigger to change the font size. Using the built-in AdaptiveTrigger as the VisualState’s StateTrigger with a MinWindowHeight and/or MinWindowWidth property, visual states can change based on app window height/width.

请阅读  让您的应用在任何尺寸的屏幕或窗口(10 x 10)上看起来都很棒 文章了解更多详情。

Please read Make your app look great on any size screen or window (10 by 10) article for more details.

此外,  欢迎
到开发环球Windows应用论坛!

请阅读粘贴帖子,尤其是

发布指南:主题行标签

Windows 10 SDK和工具的已知问题 
 并记得添加标签到自己称号。

Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools  and remember to add tag to title by yourself.

最好的问候,

Xavier Eoro

Xavier Eoro


这篇关于[UWP]字体大小自适应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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