Hi guys! Im doing a User Control that can display its Icons in Black or in White. I created a property for it and on the constructor I set the default value to White (so from the start it loads the icons otherwise nothing will be visible). If I put the UC on a Form and change the propery to black and run the code it just run fine. Values are saved, icons are shown in black. Seems ok but here is the problem...
On execution when the form create my UC it enters the constructor, and set the icons white, so it loads all the white images... then the form set the property to black, so now it loads all the black images... The images are loadad twice.
Is there a way to set propertys values that only run when placing the UC on a form and never more? (like Initialize properties in VB6)
Im doing it on C# but I guess its the same for all .Net languages.
On execution when the form create my UC it enters the constructor, and set the icons white, so it loads all the white images... then the form set the property to black, so now it loads all the black images... The images are loadad twice.
Is there a way to set propertys values that only run when placing the UC on a form and never more? (like Initialize properties in VB6)
Im doing it on C# but I guess its the same for all .Net languages.