I want to change FontStyle and FontWeight using c# in my code .
I tried this:
textblock.FontStyle =FontStyle.Normal
and
textblock.FontWeight =FontWeight.Bold
but its not working.
I want to change FontStyle and FontWeight using c# in my code .
I tried this:
textblock.FontStyle =FontStyle.Normal
and
textblock.FontWeight =FontWeight.Bold
but its not working.
I'd not recommend to do that in code, but if it is necessary:
textblock.FontStyle = Windows.UI.Text.FontStyle.Italic;
textblock.FontWeight = Windows.UI.Text.FontWeights.Bold;
Try:
FontWeight = FontWeights.Bold
class: System.Windows.FontWeight
Info from: [https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textblock.fontweight?view=windowsdesktop-8.0]
© 2022 - 2025 — McMap. All rights reserved.