tags:

views:

64

answers:

1

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!

+4  A: 

If you are using .NET 3.5 SP1, you can use the ContentStringFormat:

<Label Content="{Binding ElementName=SomeTextBox, Path=Content}" ContentStringFormat="Current Value: {0}" />
John Myczek
+1 I am, and I can. Thanks!
Pwninstein