WPF简单绘制x,y坐标 [英] WPF simple plotting of x,y coordinates

查看:1221
本文介绍了WPF简单绘制x,y坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的WPF / C#应用程序中,我必须绘制构成四边形和三角形的x / y坐标。基本上我只需要可视化由xy点形成的四边形和三角形,就像2D网格一样。



我尝试了几个图表控件,但似乎它们都是添加额外的线,似乎连接不应该连接的点。



我想我必须使用画布和线段实现这一点,但是在我浪费时间之前,我想问一下是否有人有任何有用的指示,指南,样品等。



问候

迈克尔

In my WPF/C# application, I have to plot x/y coordinates which make up quadilaterals and triangles. Basically I just need to visualize the quadilaterals and triangles formed by the xy points, as in a 2D mesh.

I have tried several chart controls, but it seems they all add extra "lines", seeming to connnect points that should not be connected.

I'm thinking I'll have to implement this using canvas, and line segments, but before I waste my time, I wanted to ask if anyone has any helpful pointers, guidelines, samples, etc.

Regards
Michael

推荐答案

我不明白为什么不做你正在做的事情。



同时,你可以尝试别人完成的作品。例如,您可以检查一些CodeProject的工作,例如这两个:

平移,缩放和更多的WPF图表控制 [ ^ ],

OpenWPFChart:汇编组件中的图表:第一部分 - 零件 [ ^ ]。



你可以找到更多: http://www.codeproject.com/search.aspx?q = WPF +图表& doctypeid = 1 [ ^ ]。



-SA
I don't see why not doing what you are doing.

At the same time, you can try out works done by others. For example, you can check some CodeProject works, such as these two:
WPF Chart Control With Pan, Zoom and More[^],
OpenWPFChart: assembling charts from components: Part I - Parts[^].

You can probably find more: http://www.codeproject.com/search.aspx?q=WPF+charts&doctypeid=1[^].

—SA


这篇关于WPF简单绘制x,y坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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