Make text to have background + border
If I have a label with its content "White, Yellow, Black" and I want to make "yello开发者_JAVA技巧w" to have a white background color + border with black line around the word "Yellow".
What XAML code is needed?
You need to split the content:
<Label>
<StackPanel Orientation="Horizontal">
<TextBlock Text="White, "/>
<Border BorderBrush="Black" BorderThickness="1">
<TextBlock Background="White" Text="Yellow"/>
</Border>
<TextBlock Text=", Black"/>
</StackPanel>
</Label>
(If this is not what you want you should express yourself more clearly)
精彩评论