WPF button change content size

<Button Name="button" Content="Hello" Height="100" Width="200" Click="button_Click_2">

    <Button.ContentTemplate>

        <DataTemplate>

            <Viewbox>

                <TextBlock>MyButton</TextBlock>

            </Viewbox>

        </DataTemplate>

    </Button.ContentTemplate>

</Button>

Copy from https://social.msdn.microsoft.com/Forums/vstudio/en-US/188c196e-90d8-4584-bc62-38d7e008cf5c/how-do-i-resize-button-text-upon-button-resize?forum=wpf

 

WPF button change content size

上一篇:不忘初心 Windows 10 纯净精简八合一


下一篇:winform 项目配置系统未能初始化