【发布时间】:2011-04-21 05:33:09
【问题描述】:
我需要将一个简单的字符串附加到我的命令参数中,但它不起作用。 StringFormat 支持这个还是我做错了什么?
<DataTemplate x:Key="ClickableHeaderTemplate">
<Button x:Name="btn" Content="{Binding}" Background="Transparent"
Command="{Binding DrilldownHeaderClicked}"
Tag="{Binding RelativeSource={RelativeSource Self}, Path=Content}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Tag, StringFormat=somestring\{0\}}"> --- formatting doesnt work. tried without escape seq as well as in 'somesting{0}'.
</Button>
</DataTemplate>
【问题讨论】:
标签: wpf wpf-controls binding wpftoolkit wpfdatagrid