Assuming there are two panels in a winform, show like below.
Panel1 | Panel2 |
Panel1.dock is left.
Panel2.dock is fill.
Right now, add a status bar at the bottom of this winform. Howerver, the status bar will located at the bottom under panel2, rahter than the bottom of this winform. Here is the sample.
If choose the status bar on design of IDE, set it send to the back(置底), that the view of the panel should be like below:
The reason for this senario is that the order of control being added to theri parent. For more details, please check the designer.cs of the winform.
For the first case:
this.controls.add(statusbar);
this.controls.add(panel1);
this.controls.add(panel2);
For the second case:
this.controls.add(panel1);Indeed, the operation of “send to back” and “bring to front” just change the order of being added into parent container, in this case, parent container is the winform.
this.controls.add(panel2);
this.controls.add(statusbar);
So if the dock style setting of the controls is not fit for your design, please consider change the order of this controls.