In WPF, it’s pretty common to display differenct properties of an object as if there where one.
Typycally, I have a User, which contains a FirstName and a LastName and I want them both to be displayed as one.
<TextBlock> <TextBlock.Text> <MultiBinding StringFormat="{}{0} ({1})" > <Binding Path="User.FirstName"></Binding> <Binding Path="User.LastName"></Binding> </MultiBinding> </TextBlock.Text> </TextBlock>
Enjoy!
No Comments Yet