简体   繁体   English

有没有办法在c#的In Designer.cs中按顺序插入控件?

[英]Is there any way to insert control by order In Designer.cs in c#?

i made a two button control, but when i saw Designer.cs file, the controls were inserted like this:我做了一个两个按钮的控件,但是当我看到 Designer.cs 文件时,控件是这样插入的:

this is the captured image这是捕获的图像

i think this is a problem cause this.Controls list save items by reverse order.我认为这是一个问题,因为 this.Controls 按相反顺序列出保存项目。

so.. is there any way to save items by order?所以..有什么办法可以按订单保存物品吗?

The only time this would matter is if you were placing two controls on top of each other.唯一重要的是,如果您将两个控件放在彼此之上。 Even then though, the order in the Designer file wouldn't matter as long as you update your Z-index and Visibility correctly.尽管如此,只要您正确更新Z-indexVisibility ,Designer 文件中的顺序就无关紧要了。

If it really bothers you, you can update the designer file manually, but I try to avoid that if at all possible.如果它真的困扰你,你可以手动更新设计器文件,但我尽量避免这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM