How to convert retrieved property 'BackColor' to System.Drawing.Color?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2017
06:12 AM
02-22-2017
06:12 AM
How to convert retrieved property 'BackColor' to System.Drawing.Color?
Hi,
How do I convert retrieved BackColor property to System.Drawing.Color?
This is the code I use to get the BackColor:
object backColorValue = textEdit.GetProperty<object>("BackColor");
But how do I convert it to type System.Drawing.Color? According to TestLeft Spy this is the class name of this property (ClrFullClassName)
Simple casting does not seem to work:
Color c = (Color) backColorValue;
Exception:
Additional information: Specified cast is not valid.
0 REPLIES 0
