主窗体上的C#多页 [英] C# multiple page on main form

查看:187
本文介绍了主窗体上的C#多页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,先生...

我想使用C#构建应用程序.而且我想在主窗体上显示多个页面..一直以来,我都使用制表符控件来构建它,但是看起来不多..因此,我尝试使用面板,但发现很难更改代码和界面...是否存在在主表单上制作多个页面的最佳方法?

非常感谢您的帮助.

excuse me sir...

i want to build application using C#. and i want multiple page on main form.. all this time i build it with tab control, but not much to look at.. so i try using panel and i find it difficult to change the code and interface... is there a best way to make multiple pages on main form ?

thank you very much for your help

推荐答案

是的,TabControl是在多个页面"中显示控件的最简单方法之一,它可以提供不错的结果,并且对用户来说足够方便(与强烈建议不要使用的MDI不同).

其他一些样式也有好处,但是数量级更为复杂.例如,像Visual Studio中那样的停靠界面(码头+选项卡).问题是:.NET库中不可用,需要第三方.我以前所知道的所有故障都有.而且不容易开发.

因此,TabControl仍然是最佳选择.而且我从来没有见过用它编程的任何问题.如果您遇到任何问题,欢迎提出特定问题,我们将竭诚为您服务.

—SA
Yes, TabControl is one of the easiest ways to present the control in multiple "pages" which gives nice results and is convenient enough for the users (unlike MDI which is highly discouraged).

Some other styles have benefits, but order of magnitude more complex. For example, docked interface (docks + tabs) like in Visual Studio. The problem is: not available in .NET libraries, needs 3rd parties; and all I knew before had some glitches. And not easy to develop.

So, TabControl remains nearly optimal choice. And I never saw any problem in programming with it. If you face some, you are welcome to ask particular questions, we will gladly help you.

—SA


您没有指定技术,但是如果您在WPF中工作,则它具有Page选项,该选项包括来回移动的功能,例如IE浏览器.

如果您想要类似的东西,而不是WPF,我建议将每个页面实现为用户控件,将它们全部放入窗口中并适当地设置可见性.更多的工作,但不应该太糟糕.
You did not specify the technology, but if you are working in WPF, it has a Page option that includes the ability to go back and forth like Internet Explorer.

If you want something similar, but not WPF, I would recommend implementing each page as a user control, putting them all in a windo and setting visibility appropriately. More work, but should not be too bad.



我想这就是您要寻找的东西-
像Dock容器一样的Visual Studio IDE [使用VB.Net的简单可停靠表单 [
Hi,
I think here is what you are looking for-
Visual Studio IDE like Dock Container[^]
Simple Dockable Form With VB.Net[^]


这篇关于主窗体上的C#多页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆