Reputation: 17775
Is there a way to set a Label's Content
property to both a Binding Expression AND a static string value? I want to be able to display something like this:
"Current Value: [Value From Binding]"
I was thinking something like this would work, but apparently it doesn't:
<Label Content="Current Value: {Binding ElementName=SomeTextBox, Path=Content}"/>
Thanks in advance!
Upvotes: 0
Views: 259
Reputation: 12256
If you are using .NET 3.5 SP1, you can use the ContentStringFormat:
<Label Content="{Binding ElementName=SomeTextBox, Path=Content}" ContentStringFormat="Current Value: {0}" />
Upvotes: 5