Skip to content

WPF TextBlock&Label随父级控件缩放

L edited this page Apr 16, 2020 · 2 revisions

效果:
20200416_200544

需要Label/textblock的文字大小随resize改变,则使用Viewbox

<Viewbox Stretch="Uniform">
	<TextBlock Name="myTextBlock" Text="move and rezise TextBlock"></TextBlock>
</Viewbox>

参考资料

How to set textblock or label with resizable font size in WPF?

Clone this wiki locally