I have 2 fields that I would like to format in a TextBlock, for example: "{0} of {1} hours is used."
Currently:
<TextBlock Text="{Binding HoursEntered}" />
<TextBlock Text=" of " />
<TextBlock Text="{Binding EstimatedHours}" />
<TextBlock Text=" hours used " />
I looked at StringFormat for a single field, however, it seems this is only available for WPF, not for Silverlight:
<TextBlock Text="{Binding Path=HoursEntered, StringFormat='{0} of XX hours used'}"/>
I was thinking of using MultiBinding, but is this not possible in Silverlight 3?
How can I create a format string with several related fields in Silverlight 3 xaml?
source
share