zedgraph - 在 ASP.NET 页面中创建 masterpane
如何从 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 usingmasterPane.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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您链接到的页面准确显示了如何执行此操作。你尝试过他们的例子吗?
该示例获取在
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 theRenderGraph
event handler.