W
wildThought
I have a window with a user control on it. I want to be able to swap
out different user controls depending on a menu choice. The swappable
user controls UserControlBaseA and UserControlBaseB are inherited
from UserControlBase. What I did is I placed UserControlBase on my
window and it has a name of uc1. Now when the window loads or if the
user chooses a different user control from the menu I want to change
the assignment of uc1.
The following compiles, yet I cannot see the new user control on the
window. Any suggestions?
uo1 = new ucUserControlBaseA();
uo1.Show();
uo1.Size = new System.Drawing.Size(469, 602);
uo1.Location = new System.Drawing.Point(4, 4);
uo1.Invalidate(true);
out different user controls depending on a menu choice. The swappable
user controls UserControlBaseA and UserControlBaseB are inherited
from UserControlBase. What I did is I placed UserControlBase on my
window and it has a name of uc1. Now when the window loads or if the
user chooses a different user control from the menu I want to change
the assignment of uc1.
The following compiles, yet I cannot see the new user control on the
window. Any suggestions?
uo1 = new ucUserControlBaseA();
uo1.Show();
uo1.Size = new System.Drawing.Size(469, 602);
uo1.Location = new System.Drawing.Point(4, 4);
uo1.Invalidate(true);