在自定义/用户控件添加设计时支持嵌套的容器(的WinForms)嵌套、自定义、控件、容器

2023-09-03 02:13:01 作者:袖中河山

我有一些类似于巫师控制,中间是一个小组,我想用它来放置任何子控件。

I have something similar to a wizard control, in the middle is a Panel I would like to use to place any child controls.

我已经使用ScrollableControlDesigner将使降至添加到自定义/用户控件的控件中,但是这不是我所需要。它需要被添加到容器中,所以布局可以在不影响外的控制(标题中,导航按钮)应用

I have found using the ScrollableControlDesigner will allow dropped controls to be added to the custom/usercontrol, but this is not what I require. It needs to be added to the container, so layout can be applied without affecting the 'outer' controls (heading, navigation buttons).

我已经试过各种方法,没有工作,看着哈克。

I have tried various ways, that did not work, and looked hacky.

任何想法?

推荐答案

我找到了答案这里!

关键是 ControlDesigner.EnableDesignMode()

 
精彩推荐
图片推荐