c# fontweight programmatically code example Example: c# fontweight in code textBlock.FontWeight = FontWeights.Bold;