Have you heard of "StringFormat" ?

By [)ia6l0 iii

"StringFormat" is a new property (WPF) that allows you format strings in Binding. The below XAML Snippet shows you how to do that.

<TextBlock>
<TextBlock.Text>  
<MultiBinding StringFormat="{}{0}, {1}, {2}">
<Binding Path="EmployeeSalutation" />
<
Binding Path="EmployeeName" />
<
Binding Path="EmployeeAge" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>

You need 3.5 SP1 for this to work.

Have you heard of "StringFormat" ?  (1398 Views)