如何在按钮中设置文本换行 [英] How to set textwrapping in Button

查看:60
本文介绍了如何在按钮中设置文本换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网上搜索了一下,没有找到解决办法.我想我错过了以下代码的一些内容来使文本换行:

<前><Button x:Name="btnCustomerAging" Background="Green" BorderBrush="Green" Foreground="White" FontSize="33" Horizo​​ntalAlignment="Left" Margin="662,106,0,0" Grid.Row="1" VerticalAlignment="Top" Height="213" Width="238"><文本包装>客户所在地</TextWrapping>

解决方案

这会起作用.

did a search on internet, could not find the solution. I think I missed something for below code to make the text wrap:

<Button x:Name="btnCustomerAging" Background="Green" BorderBrush="Green" Foreground="White" FontSize="33" HorizontalAlignment="Left" Margin="662,106,0,0" Grid.Row="1" VerticalAlignment="Top" Height="213" Width="238">

            <TextWrapping>  

              Customer Locations

            </TextWrapping>


</Button>

解决方案

This will work.

<Button x:Name="btnCustomerAging" Background="Green" BorderBrush="Green" Foreground="White" FontSize="33" 
        HorizontalAlignment="Left" Margin="662,106,0,0" Grid.Row="1" VerticalAlignment="Top" Height="213" Width="238">
    <TextBlock Text="Customer Locations" TextWrapping="Wrap" />
</Button>

这篇关于如何在按钮中设置文本换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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