Windows Phone 8 xaml textblock binding format
- by user2042227
I would like to format a textblock which is binded to a value, to show "R" before the actuall value, is this possible, cause I cannot directly change the value?
Thank you
<ListBox x:Name="lstbundleListbox"
Foreground="White" Height="320" HorizontalAlignment="Center">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding name}"
TextWrapping="Wrap"
HorizontalAlignment="Center"/>
<TextBlock Text="{Binding cost}"
TextWrapping="Wrap"
HorizontalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ListBox>
So I basically want the texblock to show R(cost)