Search code examples
c#winformscomponentslayer

WinForm UI components layer order


When we add any UI or container in WinForms, the later added component comes over the earlier added components, we can say it is in a higher layer.

How to change that layer order or component order after adding components?


Solution

  • Is it when you load components dynamically in code or in the designer? If it is in the designer you can use the Format -> Order -> Send to Back and Format -> Order -> Bring to Front commands. Send to Back and Bring to Front are also available in the context menu when you right-click a control, as well as in the "Layout" toolbar that should appear automatically when you work in the forms designer.