When data binding two elements together, how can I include the binding information AND text as in the case below where I want my label to say:
The font size is 8.5
<Grid>
<StackPanel>
<Slider Name="theSlider" Margin="5" Minimum="8" Maximum="14"></Slider>
<Label Content="The font size is: {Binding ElementName=theSlider, Path=Value}" FontSize="{Binding ElementName=theSlider, Path=Value}"></Label>
</StackPanel>
</Grid>
Thank you, so here is the solution using ContentStringFormat in .NET 3.5:
<Grid>
<StackPanel>
<Slider Name="theSlider" Margin="5" Minimum="8" Maximum="14"></Slider>
<Label Content="{Binding ElementName=theSlider, Path=Value}" ContentStringFormat="The font size is {0}."/>
</StackPanel>
</Grid>