且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在winforms设计器中访问继承的控件

更新时间:2023-10-03 20:12:34

当您尝试从带有设计器的继承控件访问基本控件中声明的 TableLayoutPanel 时,您正在使用 WinForms 中称为视觉继承"的功能".

When you try to access from the inherited control with the designer to the TableLayoutPanel declared in the base control, you're using a feature in WinForms called "Visual Inheritance".

遗憾的是 TableLayoutPanel 不支持视觉继承:http://msdn.microsoft.com/en-us/library/ms171689%28VS.80%29.aspx

Unfortunately TableLayoutPanel doesn't support visual inheritance: http://msdn.microsoft.com/en-us/library/ms171689%28VS.80%29.aspx

这就是 TableLayoutPanel 在继承的控件中显示为阻塞的原因.

That's why the TableLayoutPanel appears blocked in the inherited controls.