WPF Button Content 的StringFormat

XML 复制代码
<telerik:RadButton
    Grid.Column="0"
    Height="40"
    Command="{Binding DataContext.FlowControlCommand, RelativeSource={RelativeSource AncestorType=ListBox}}"
    CommandParameter="{Binding}"
    FontSize="14"
    FontWeight="SemiBold">
    <TextBlock
        Height="40"
        FontSize="14"
        FontWeight="SemiBold"
        Text="{Binding FlowDescription, StringFormat={}执行{0}}" />
</telerik:RadButton>

<telerik:RadButton
    Grid.Column="1"
    Height="30"
    Background="#6C757D"
    Command="{Binding DataContext.LookFlowCommand, RelativeSource={RelativeSource AncestorType=ListBox}}"
    CommandParameter="{Binding}"
    Content="{Binding TreeViewActionModel, StringFormat=查看:{0}}"
    FontSize="12" />

第二种方式不生效:

记得使用第一种

相关推荐
feixing_fx3 小时前
第一个 JS 程序:在浏览器控制台和 Node 中分别运行
开发语言·前端·javascript·前端框架·ecmascript
feixing_fx5 小时前
变量与声明:let、const、var 的选择边界
开发语言·前端·javascript·前端框架
兴趣互联6 小时前
jeecgboot nacos2.3.2 使用pgsql
java
hudd6686 小时前
JavaEE 初阶 - 文件操作和IO
java·开发语言·java-ee
JavaGuide7 小时前
Cloudflare 开源的这套神级安全审计 Skill 太好用了!
前端·后端
Flynn Liang7 小时前
HikariCP 连接池不是越大越好:I/O 密集型 Java 服务的数据库容量工程
java·数据库·mysql·高并发·连接池·hikaricp·sql 优化
学长毕设7 小时前
基于SpringBoot社区快递驿站物流配送系统-附源码
java·spring boot·后端
Flynt8 小时前
Java4Shell 实测:EPYC 一跑就中招,关掉 Base64 硬件加速,1KB 解码慢 14 倍
java·安全·性能优化
Resean02238 小时前
Spring 源码分析(七)AOP 原理(上):代理的创建
java·后端·spring
孟健8 小时前
用 unslop 拯救 AI 生成网页的塑料感,7 分钟重构落地实测
前端·人工智能·ai编程