开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜