如何使Stringbuilder内容的一部分变粗?

Sri*_*Sri 3 c# stringbuilder windows-phone-7

StringBuilder sb = new StringBuilder();
sb.Append(
        string.Format("{0} |{1} ", Name, Value)
        );
Display.Text = sb.ToString();  // Display is a WP7 TextBlock control 
Run Code Online (Sandbox Code Playgroud)

我想把"名字"变成粗体.有可能吗?

Ant*_*nes 7

ChrisF提供了RichTextBox一个解决方案,但它不太为人所知,简单的字体变化是可以简单的TextBlock:-

myTextBlock.Inlines.Add(new Run() { Text = "Hello " });
myTextBlock.Inlines.Add(new Run() { Text = "World", FontWeight= FontWeights.Bold });
Run Code Online (Sandbox Code Playgroud)