用粗体字写出 [英] Put words in a sentence bold

查看:110
本文介绍了用粗体字写出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获得以下结果:

约翰在奥斯陆中有一个红色 农场.

I''m trying to get this result:

John has a red farm in Oslo.

<TextBlock Grid.Row="0" Grid.Column="0" TextWrapping="Wrap">
     <TextBlock.Text>
          <MultiBinding StringFormat="- John has a {0} {1} in {2}.">
               <Binding Path="ColorName"/>
               <Binding Path="BuildingName"/>
               <Binding Path="LocationName"/>
          </MultiBinding>
     </TextBlock.Text>
</TextBlock>


但是我不知道如何用粗体显示可变词.

我愿意接受任何建议,即使它们与我的代码完全不同.我想要的只是想要的结果,它必须是可翻译的.

感谢您的任何建议.


But I don''t know how to get the variable words in bold.

I''m open for any suggestions, even if they completely differ from my code. All I want is the desired result and it has to be translateable.

Thanks for any suggestions.

推荐答案

找到了一个帖子
Found a post here - just one solution is given there but it might help.

You could actually use multiple text blocks - some bold and others normal to display data.


您不能在单个TextBlock控件中进行操作.
You can''t do it in a single TextBlock control.


这篇关于用粗体字写出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆