在自定义/用户控件添加设计时支持嵌套的容器(的WinForms) [英] Adding design-time support for a nested container in a custom/usercontrol (Winforms)
问题描述
我有一些类似于巫师控制,中间是一个小组,我想用它来放置任何子控件。
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.
任何想法?
推荐答案
我找到了答案<一href="http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.windowsforms.designtime/2005-11/msg00060.html"相对=nofollow>这里!
关键是 ControlDesigner.EnableDesignMode()
。
这篇关于在自定义/用户控件添加设计时支持嵌套的容器(的WinForms)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!