Reputation: 2863
Given the below TextBlock, how do I make the SomeString
part of the text bold?
<TextBlock Text="{Binding SomeString,StringFormat='{}Row: {0}'}" />
ie: If SomeString = "ABC"
I want the TextBlock to look like this:
Row: ABC
Upvotes: 1
Views: 149
Reputation: 18040
Try something like this
<StackPanel Orientation="Horizontal">
<TextBlock Text="Row:"/>
<TextBlock FontWeight="Bold" Text="{Binding SomeString}"/>
</StackPanel>
Upvotes: 2
Reputation: 1071
Basically, you could format each individual Run inside the same TextBlock.
Through XAML
<TextBlock>
<Run>Row:</Run>
<Run FontWeight="Bold" Text="{Binding SomeString}"></Run>
</TextBlock>
Hope this helps.
Upvotes: 2