本文介绍了使用WPF将FontSize更改为与windowSize相关吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果缩小窗口,FontSize是否变小,如果放大窗口,FontSize是否变大?
Is it possible, that the FontSize getting smaller if I shrink the window and getting bigger if I enlarge the window?
推荐答案
将文本包装在Viewbox
内.
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Viewbox>
<TextBlock Text="Sizes to fit!"/>
</Viewbox>
</Window>
这篇关于使用WPF将FontSize更改为与windowSize相关吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!