-
- realesmedia
- Posts: 85
- Joined:
Data Binding StringFormat
XAML:
My WPF project displays text "value is" before value correctly.
Noesis project displays only value without StringFormat property.
Code: Select all
<Label x:Name="label" Content="my_value"/>
<TextBlock Text="{Binding Content, ElementName=label, StringFormat={}value is: {0}}"/>
Noesis project displays only value without StringFormat property.
-
-
sfernandez
Site Admin
- Posts: 2109
- Joined:
Re: Data Binding StringFormat
Sorry, but there is a bug with StringFormat as explained here: viewtopic.php?f=3&t=1091
Meanwhile you have to use 2 TextBlocks to accomplish that:
Meanwhile you have to use 2 TextBlocks to accomplish that:
Code: Select all
<Label x:Name="label" Content="my_value"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="value is: "/>
<TextBlock Text="{Binding Content, ElementName=label"/>
</StackPanel>
Who is online
Users browsing this forum: No registered users and 2 guests