Reputation: 31
I need to use the FromName Method, but for some reason it is not available. I have been googling for a while but I cannot find a solution.
Upvotes: 1
Views: 2899
Reputation: 71
I thinks you also have a reference to System.Windows.Media, hence the IDE is trying to refer to its Color class methods.
Try var c = System.Drawing.Color.FromName("colorname");
Upvotes: 2
Reputation: 2916
Try using System.Drawing.Color.FromName instead of Color.FromName. If that doesn't help, maybe the problem comes from the Framework, which is quite unlikely ..
Upvotes: 0