T
timtos
I want to set a color property of a user control by default.
I am doing it like this:
....
DefaultValue(typeof(System.Drawing.Color), "Blue"),
....
The compiler likes it but my program ignores it!
I´ve also tried other things like:
DefaultValue(typeof(Color), "Blue"),
DefaultValue(typeof(Color), "Color.Blue"),
DefaultValue(typeof(System.Drawing.Color), "0, 0, 255"),
DefaultValue(typeof(System.Drawing.Color), "0; 0; 255"),
Searching the net I found a lot of solutions like the ones above.
But the problem is none of them are working for me.
Any ideas?
Thanks,
timtos.
I am doing it like this:
....
DefaultValue(typeof(System.Drawing.Color), "Blue"),
....
The compiler likes it but my program ignores it!
I´ve also tried other things like:
DefaultValue(typeof(Color), "Blue"),
DefaultValue(typeof(Color), "Color.Blue"),
DefaultValue(typeof(System.Drawing.Color), "0, 0, 255"),
DefaultValue(typeof(System.Drawing.Color), "0; 0; 255"),
Searching the net I found a lot of solutions like the ones above.
But the problem is none of them are working for me.
Any ideas?
Thanks,
timtos.