在 C# 中将两个/多个图表控件合并为一个
谁能告诉我如何将两个控件(而不是必要的图表控件)组合在一起?我需要做什么?也许有书或例子?
我正在使用 System.DataVisualization.Charting 控件。谢谢。
Can anyone please tell how to combine two controls, not necessary charting controls, at one? What I need to do? Maybe there is a book or example?
I'm using System.DataVisualization.Charting
controls. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
组合控件的概念实际上是关于聚合功能的。
可以通过两种方式聚合可能跨越多个控件的功能;可以通过
UserControl
简单地封装控件,因为它们以其原始形式存在,或者创建一个自定义控件,该控件将提供您所需的不同控件的功能。UserControl
和自定义控件之间的差异表面上很微妙,但本质上却很重要封面。取决于您的技术; WinForms、WPF 等...网上有用于 创建的示例一个用户控件
。The concept of combining controls is really about aggregating functionality.
The functionality which may span multiple controls can be aggregated in two ways; either via a
UserControl
which simply encapsulates the controls as they exist in their original form or creating a custom control which will provide the functionality from the varying controls which you are after.The differences between a
UserControl
and custom control are subtle on the surface but significant underneath the covers. Depending on your technology; WinForms, WPF, etc... there are samples online on for creating aUserControl
.