Adding a row when binding data in Silverlight xaml Question

I have a control that accepts a string, but when it displays, I want to add "Hello" to this string directly in xaml, how can I do this?

+3
source share
1 answer

You can bind to a property and use StringFormat:

<TextBlock Text="{Binding Path=UserName, StringFormat=’Hello \{0\} ’}"/>

More information can be found here: http://www.designersilverlight.com/2010/05/28/silverlight-4-binding-and-stringformat-in-xaml/

+6
source

All Articles