I have created two separate UserControls and (depending on which RadioButton is selected) I would like one or the other to be displayed.
Right now, I simply dragged one instance of each UserControl onto the form and placed one on top of another (setting one .Visible = false;).
This is OK, but I was wondering if there was a better or more appropriate way to do this?
That’s perfectly reasonable.
If you’re concerned about keeping around resources you’re no longer using, you can add a
Paneland add or remove the control from there.E.g.
If the user controls do things like connect to data sources, you might want to actually dispose and recreate them. Really depends on how complex the controls are. If they’re just capturing a few properties, your current solution is fine.