For example if I have this:
string message = "The Quick Brown Fox";    
someTextBlock.Text = message;
it will 开发者_C百科show by default like this:
The Quick Brown Fox
How to I make it show up in a TextBlock (or any element with content)?
Like this: The Quick Brown Fox
Note:
By "inline" I am refering to how this is done in HTML:
someDiv.InnerHtml = "The <b>Quick</b> Brown <b>Fox</b>";
It is better to do it in XAML like this:
<TextBlock>
    The <Bold>Quick</Bold> Brown <Bold>Fox</Bold> 
</TextBlock>
But you also can do it in code via Inlines property of TextBlock:
someTextBlock.Inlines.Add(new Run() { Text = "The " });
someTextBlock.Inlines.Add(new Run() { Text = "Quick ",  FontWeight = FontWeights.Bold });
someTextBlock.Inlines.Add(new Run() { Text = "Brown " });
someTextBlock.Inlines.Add(new Run() { Text = "Fox",  FontWeight = FontWeights.Bold });
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论