2011-06-17 103 views

回答

2

可以使用ApplyPropertyValue()方法:

TextSelection selection = yourRichTextBox.Selection; 
if (!selection.IsEmpty) { 
    selection.ApplyPropertyValue(TextElement.FontWeightProperty, 
     FontWeights.Bold); 
}