开发者

Is there something like master page in desktop aplications?

Can I have master form that w开发者_开发技巧ill contain windows forms? Or even windows control?

Thanks a lot.


For a form to contain other forms, you want MDI (as Zach Johnson already said). Setting the relevant form properties (IsMdiContainer / MdiChildren / MdiParent / etc) will get you the behaviour you want.

For something like a "master page for forms", you could try using Visual Inheritance. First you define a basic "master" form layout, leaving space for the controls on the child forms. Then when you create new forms, be sure to select Add New-->Windows Forms-->Inherited Form, and Visual Studio will prompt you to select a parent form to inherit from.


You can achieve this with inheritance i suppose


I think you want to create a Multiple Document Interface (MDI). Also, all windows forms can contain controls, so you can by definition create a form that contains a control.


A winform application I work has a main form that is completely built in this manner. It uses one Winform and everything displayed on it is a user control. All the displays are written as plugins and can be pulled into the applications menu and have their user control displayed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜