WPF 创建一个新的TextBlock控件 var titleTextBlock = new TextBlock Text = caption FontSize = 18 Foreground = BrushesBlue ;
可以通过设置TextBlock的FontWeight属性来实现字体加粗,例如:
titleTextBlock.FontWeight = FontWeights.Bold;
原文地址: https://www.cveoy.top/t/topic/cG7X 著作权归作者所有。请勿转载和采集!