gpt4 book ai didi

wpf - 如何使用冒号设置标签样式

转载 作者:行者123 更新时间:2023-12-04 16:21:46 34 4
gpt4 key购买 nike

我在 WPF 中有一个详细信息 View 窗口,标签可能如下所示。

<Label Content="{x:Static properties:Resources.Reference}" />

所以这是从我的属性(property)资源获取它的内容。

如何转换/格式化内容,使其在每个标签项后都有一个冒号。例如而不是内容简单地显示引用我希望它转换为引用:

最佳答案

我最终得到的解决方案是:

<Label Content="{x:Static properties:Resources.Reference}" ContentStringFormat="{}{0}:"/>

关于wpf - 如何使用冒号设置标签样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2842775/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com