WPF TextBlock&Label随父级控件缩放

效果:

需要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?

posted @ 2020-04-16 20:10  Lulus  阅读(934)  评论(0编辑  收藏  举报