问题
For example, within a TabPage, I have a DataGridView that is docked "Fill". If I set the dock property of a UserControl to the the "Right" position, the DataGridView moves to the left as expected. If I replace the UserControl with a Panel or Label (also docked to the "Right" within the TabPage) the DataGridView does not make room. The Panel or Label just overlay the DataGridView. I tried stackoverflow and did some reading but did not see any rules (yet). Thanks.
回答1:
Their Z-order. You can manipulate it with the Bring to Front and Move to Back context menu items, right-click a control to see the menu.
It is much clearer when you use the View + (Other Windows) + Document Outline window, it lists them in Z-order underneath their container. And allows you to drag+drop the controls to change their order, you see the effect in the designer immediately.
来源:https://stackoverflow.com/questions/21858290/winforms-what-determines-if-docking-moves-other-controls