【发布时间】:2013-07-11 13:20:45
【问题描述】:
我正在使用componentart 开发一个 wpf 应用程序我有一个这样的文本块
<TextBlock FontSize="28" Text="{Binding DataPoint.Y, StringFormat=\{0:#\\%\}}" Foreground="Black">
如您所见,我的 StringFormat 在数字后放了一个 '%' 符号,但如果我的数据是 0.0(我在后面的代码中填充组件,我的变量是双精度数)我得到“%”,但我想要要获得“0%”,我该怎么做?
【问题讨论】:
标签: wpf xaml textblock string-formatting componentart