WPF Button去除按钮边框,添加下划线

XML 复制代码
        <Button Width="45" Height="25" FontSize="20" Background="Transparent" BorderBrush="Transparent" Foreground="#FFC9A322" Click="Btn_Retry_Click" >
            <TextBlock>
                 <Underline>重试</Underline>
            </TextBlock>
        </Button>

去除按钮边框: BorderBrush="Transparent" (边框颜色设置为透明)

去掉按钮背景:Background="Transparent"(背景颜色设置为透明)

Content添加下划线:Button 标签内添加 TextBlock 文本标签,通过使用Underline来实现下划线功能

相关推荐
xcLeigh6 小时前
WPF进阶 | WPF 数据绑定进阶:绑定模式、转换器与验证
c#·wpf
学与用2 天前
【deepseek实战】绿色好用,不断网
ai·c#·wpf
的不对不3 天前
WPF基础03——InitializeComponent()函数解释
windows·c#·.net·wpf
军训猫猫头4 天前
61.异步编程1 C#例子 WPF例子
开发语言·c#·wpf
时光追逐者4 天前
一组开源、免费、Metro风格的 WPF UI 控件库
ui·开源·c#·.net·wpf·.netcore·微软技术
军训猫猫头5 天前
58.界面参数传递给Command C#例子 WPF例子
开发语言·ui·c#·wpf
xcLeigh5 天前
WPF基础 | 深入 WPF 事件机制:路由事件与自定义事件处理
c#·wpf
军训猫猫头6 天前
60.await与sleep的原理分析 C#例子 WPF例子
开发语言·ui·c#·wpf
敲代码的TKP8 天前
WPF自定义布局--瀑布布局
wpf
xcLeigh8 天前
WPF基础 | WPF 基础概念全解析:布局、控件与事件
c#·wpf