3
我需要追加一個簡單的字符串到我的commandparameter,但不起作用。 StringFormat支持這個還是我做錯了什麼?WPF - 綁定StringFormatting不工作
<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>