Bold
不是FontStyle。这是一个字体粗细。请参阅this
和this
链接。
例如:
control.FontWeight = FontWeights.Bold;
Update
:当然,这个答案适用于基于XAML的框架(WPF,Silverlight,WinPhone,WinRT)。在其他框架中,粗体可以是样式或其他。
myTextBox.Font =
new Font(myTextBox.Font, outputTextBox.Font.Style | FontStyle.Bold);