If i use color name then it is working fine with the below code. var property = typeof(XBrushes).GetProperty("Black", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.IgnoreCase);
But if i use any color code(#00A352) instead of color name , then GetProperty is returning null. Example , the below code is returning null.
var property = typeof(XBrushes).GetProperty("#00A352", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.IgnoreCase);
please help me how to use the color code with this above code.
|