Adding design-time support for a nested container in a custom/usercontrol (Winforms)

…衆ロ難τιáo~ 提交于 2019-12-30 05:11:11

问题


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

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.

Any ideas?


回答1:


I found the answer here!

The key is ControlDesigner.EnableDesignMode().



来源:https://stackoverflow.com/questions/594808/adding-design-time-support-for-a-nested-container-in-a-custom-usercontrol-winfo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!