How to prevent User Control from being initialized? I want to initialize it by myself, not in the constructor in InitializeComponent(); ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well that seems silly, but you have already answered your question; remove the call to
InitializeComponent(). Have fun recreating the auto-generated designer code!EDIT:
Ok, so per your edit we know what the actual problem you are trying to solve is:
Thus, you need to add the control at runtime instead of at design time. This is easy to do.