如何在紧凑的框架中创建用户容器控件?

How to create a user container control in compact framework?

当我们需要在"regular"框架中创建容器控件时, 我们只需添加

using System.ComponentModel;

和控件的属性 class:

[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", 
           typeof(IDesigner))]
public partial class MyContainerControl : UserControl
....

然而,在紧凑型框架中这似乎是不可能的,因为 DesignerAttributes class 不存在。

我已经有了用户控件,但我需要它在设计时充当容器。
我尝试用谷歌搜索任何我能想到的东西,但一无所获。
除了继承现有的容器控件之外,还有什么方法可以创建容器用户控件吗?

UserControlclass直接继承自ContainerControl,与Form继承相同。奇怪的是,Panel 继承自 ScrollableControl(ContainerControls 父级),因此尽管是面板,但它不是容器。

无论如何,问题不在于继承。设计时控制实际上是在一个单独的程序集中定义的,该程序集是用完整的框架编译的,以便为您提供属性(希望在两者之间共享源代码)。真的是一个完全独立的控件。

See here