多页 [英] Multiple Pages

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

问题描述

您好!

我对Visual Studio有疑问。我喜欢这个节目,我喜欢用它设计,我喜欢它的一切。困扰我并且我无法弄清楚的一件事是...如果你有(例如)带有"Home"的侧边栏,"新闻",
" Blog"按钮在它上面,然后在侧边栏右侧有一个主面板,如何根据您单击的按钮更改主面板。我已经看过一些关于Tab Control的教程和"让多个面板在彼此之上,
并只显示想要的那个",但我不喜欢这些。还有其他任何方式,比如HTML或其他语言,您可以更改主面板上的所有内容。

I have a question on Visual Studio. I love the program, I love designing with it, I love simply everything about it. One thing that bothers me and that I can't figure out is... If you have (for example) a sidebar with "Home", "News", "Blog" buttons on it, and then to the right of the sidebar you have a main panel, How can I make the main panel change depending on the button you click. I've seen some tutorials on Tab Control and "Making multiple panel on top of eachother, and showing only the wanted one", but I don't like those. Is there any other way, like in HTML or some other language, that you can change everything on the main panel.

我很感激任何帮助,谢谢! (对不起,如果我很难理解我的意思)

I'd appreciate any help, Thank You! (Sorry if it's hard to understand what I mean)

*(Windows Forms C#) - 我应该使用其他东西吗?

*(Windows Forms C#) - Should I use anything else?

推荐答案

嗨Flephi,

Hi Flep

欢迎来到MSDN论坛。

Welcome to MSDN forum.

请查看与您有类似疑问的主题:

https://stackoverflow.com/questions/22322470/multiple-pages-withing-one-form-c-sharp

Please have a look at the thread which has the similar doubt with you: https://stackoverflow.com/questions/22322470/multiple-pages-withing-one-form-c-sharp

我将使用UserControls实现此功能。单击按钮时会显示一个UserControl。我将创建一个接口(例如IView),该接口将由声明常用功能的每个UserControl实现,例如检查
是否可以从一个切换到另一个的方法(如表单的OnClosing事件)。

I'd implement this using UserControls. One UserControl is shown when a button is clicked. I'd create an interface (for example IView) that would be implemented by each UserControl that declares common functionality, like for example a method to check whether you can switch from one to another (like a form's OnClosing event).

致以最好的问候,

Joyce


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

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