I need to dock a WinForms user control at run time but I'm encountering an issue.
In my main form, I have a menu strip at the top of it. I want to programmatically add a UserControl docked to the left of the main window and below the menu strip.
When I add my User control at runtime and then set its Dock property to DockStyle.Left, it does not appear below the menustrip but instead it takes up the entire left side of the form. This causes the menustrip to be pushed to the right and does not look attractive.
I need to do this at runtime because the project requires the ability to customize which user control can appear on the left side of the main form for each user.
Any help in finding an answer would be greatly appreciated.