某些控件如Windows窗体应用程序中的母版页? [英] Some Controls like master Page in Windows Form application?

查看:81
本文介绍了某些控件如Windows窗体应用程序中的母版页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表单,面板,工具栏和搜索文本框,我想让它们像一个母版页(它不是asp.net项目)它的windowsform应用程序,当用户clik到某些东西的contetnplace持有人改变但主页内容不变。

可能吗?



例如你的网页浏览器,在顶部你看工具栏,导航栏,,,,等,然后你看到网页,如何?

hi , i have a form , panel , tool bar and search text Box , and i want to make them like a master page ( its not asp.net projects ) its windowsform application , when user clik to some thing the the contetnplace holder change but the master page content dont change .
its possible?

example ur web browser , at the top u see tool bars , navigation bar ,,,, etc , and down u see web page , how ?

推荐答案

你可以创建一个带有一些常用控件和空面板的表单或面板类为类用户设计,可以为其设置自定义(内容)控件。这个想法很简单,但是公共控件(母版的模拟)和自定义部件(内容页面的模拟)之间的这种协作需要彻底的设计。



然而,想法很简单:你可以将这些常用控件的属性和事件暴露给类的用户,这样用户就可以以某种自定义的方式耦合这两个部分的事件,分别为每个类的实例。



-SA
You can create a form or panel class with some common controls and the empty panel designed for a class user to put custom ("content") controls to it. The idea is very simple, but such collaboration between common controls (analog of master page) and custom part (analog of content page) needs thorough design.

However, the idea is trivial: you can expose properties and events of those common controls to the user of the class, so the user can couple events of both parts in some custom way, separately for each instance of the class.

—SA


这篇关于某些控件如Windows窗体应用程序中的母版页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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