zedgraph - 在 ASP.NET 页面中创建 masterpane

发布于 2024-09-15 12:10:26 字数 707 浏览 1 评论 0原文

如何从 Web C# 应用程序调用 Zedgraph 的函数 masterPane.SetLayout()? 基本上我被困在步骤 myMasterPane.SetLayout(g, PaneLayout.SingleColumn); 如何创建应该是 Graphic() 的变量 g

我尝试了 Graphics g = new Graphics(); 和 Graphics g; 这些都不起作用。 new Graphics() 给我错误 2 类型“System.Drawing.Graphics”没有定义构造函数
无论如何,我假设这需要以某种方式初始化。

与下面的示例相比,我想要做的一个重要区别是,我想使用以下命令直接从我的主窗格转到图像 masterPane.GetImage(),我的问题是我无法获得 masterpane 设置,除非我找到调用 myMasterPane.SetLayout() 的方法

我找到了这篇文章,但我无法让它工作 http://zedgraph.org/wiki/index.php?title=Use_a_MasterPane_in_a_web_page

How do I call Zedgraph's function masterPane.SetLayout() from Web C# Application?
Basically i'm stuck at step myMasterPane.SetLayout(g, PaneLayout.SingleColumn);
How do I create that variable g which is supposed to be a Graphic()

I tried Graphics g = new Graphics(); and Graphics g;
none of these work.
new Graphics() gives me Error 2 The type 'System.Drawing.Graphics' has no constructors defined
and anyways I'm assuming this needs to be initialized somehow.

One important difference that I want to do vs the example below is that I want to go directly from my master pane to an image using
masterPane.GetImage(), my issue is I can't get that masterpane setup unless I find a way to call myMasterPane.SetLayout()

I found this article but I can't get this working
http://zedgraph.org/wiki/index.php?title=Use_a_MasterPane_in_a_web_page

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妥活 2024-09-22 12:10:26

您链接到的页面准确显示了如何执行此操作。你尝试过他们的例子吗?

该示例获取在 RenderGraph 事件处理程序中传递给它的 Graphics 实例。

The page you linked to shows exactly how to do this. Did you try their example?

The example gets the Graphics instance passed to it in the RenderGraph event handler.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文