WPF Binding - StringFormat - Not Formatting

后端 未结 7 1560
迷失自我
迷失自我 2020-12-16 12:13

I have a ToolTip with a value set as:

Value=\"{Binding Path=DataItem.EquitySold, StringFormat=Reserved (Equity Share: \\{0\\}%)}\"

The tool

7条回答
  •  一生所求
    2020-12-16 12:44

    You don't need to escape the brackets. Try this (i like to put the format in single quotes):

    Value="{Binding Path=DataItem.EquitySold, StringFormat='Reserved (Equity Share: {0}%)'}"
    

提交回复
热议问题