Way to concat strings when using binding in Silverlight

Posted by Artur on Stack Overflow See other posts from Stack Overflow or by Artur
Published on 2010-04-19T20:12:33Z Indexed on 2010/04/19 20:23 UTC
Read the original article Hit count: 954

Filed under:
|
|

I wonder if there is a way of concating two strings in Silverlight inside xaml file. I have a DataGrid where one of the columns is 'Default Contact' and I would like to represent data in there as first and last name.

<sdk:DataGridTextColumn Header="Default Contact"
                        Binding="{Binding Path=DefaultContact.FirstName}" />

I was thinking about something like:

Binding="{Binding Path=DefaultContact.FirstName + " " + DefaultContact.LasttName}"

But this doesn't work. I don't even know if this is possible to achieve. Seems like really basic thing so I hope it is supported in some way.

Any help would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about .NET