Custom control--resetting designtime appearance

I have created a custom compound control to use in my application (contains a picturebox, radio button and a textbox).  All properties affecting the appearance of this control are set at runtime and are hidden from the property grid at designtime.  Maybe I am missing the obvious, but how do I get the custom control's appearance to remain static in designtime (regardless of changes made to its various appearance property settings at runtime)

Thanks in advance for any help!

Chales


Answer this question

Custom control--resetting designtime appearance

  • kush28

    Thanks for taking the time to point me in the right direction Shawn.  Your article was very helpful!

    Charles

  • YasinMo

    To do this you'll have to use a technique we call "shadowing".  If I understand you correctly, this is the same as what happens with a Control's Enabled and Visible properties -- changes to these at design time don't actually hide or disable the control in the designer.

    For an explantion of shadowing, go to the Articles section of this website, the "Designers" heading, and look for the article on Creating Custom Designers (by me).



  • Custom control--resetting designtime appearance