Hello,
what will be the equivalent in vb.net to vb6 AmbientChanged event in usercontrol?
To use the Me.DesignMode property to get the environmet in what the control is in now.
Printable View
Hello,
what will be the equivalent in vb.net to vb6 AmbientChanged event in usercontrol?
To use the Me.DesignMode property to get the environmet in what the control is in now.
Supposedly if you mark a property with the AmbientValue attribute, it should start "inheriting" values from parent containers. I've never tried that attribute myself, so I'm not sure how well it works.
I'm 99% certain for it to work, you MUST implement the super-secret ShouldSerializeXXX() and ResetXXX() methods. Those are "magic" and must end with the exact name of the property. When they are present, the designer will call them and use them to help it figure out whether it's looking at an ambient, default, or user-set value.