Link to home
Start Free TrialLog in
Avatar of Dnx_7
Dnx_7Flag for Belgium

asked on

How to set FontWeights to any value (Bold, UltraBold, ...) from C# Reflection?

Hi experts,

I have a string that contains "Bold" or "UltraBold" or something else that represents a FontWeights (in string format).
I also have an object (Type) that reprensents the "FontWeights" of a WPF control (from textblock or textbox or else)
I don't know how to set the String value to a fontweight value from reflection in C#

Any helps will be grateful,


Thanks,

Kind Regards.
ASKER CERTIFIED SOLUTION
Avatar of Ioannis Paraskevopoulos
Ioannis Paraskevopoulos
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dnx_7

ASKER

Thanks!