Is there a way that one can ‘add’ two bindings together and add some strings to them? This is quite hard to explain but one does a binding in your XAML code to a TextBlock for example like this:
<TextBlock Name="FirstName" Text="{Binding FN}" />
What I want to do is this:
<TextBlock Name="FirstLastName" Text="{Binding FN} + ', ' + {Binding LN}" />
So in essence you’ll get something like this:
Dean, Grobler
Thanks in advance!
First that comes to mind is to create additional property in
VMthat will contain concatenated values:Another approach that might help is to use converter. but in this case we assume that
FNandLNare properties of same object:and
and
VM: