如何使用wpf绘制复杂的网络拓扑? [英] How can i draw complex network topology use wpf ?

查看:302
本文介绍了如何使用wpf绘制复杂的网络拓扑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遇见在我的项目中遇到了问题.网络元素很多.也许可能包含的这些网络元素之间可能有一个或多个链接.现在,我想在屏幕上显示网络元素和 to 链接;并且所有网络元素都应该可以可拖动.谁可以给我解决方案? 思考.谢谢.

I meet face a problem in my project. There are many network elements; and perhaps these network elements perhaps contain may have one or more links between them. Now I want to show network elements and links to on the screen; and all the network elements should can be draggable. Who can give me a solution? Thinks. Thanks.

推荐答案

我认为我的建议对您来说没有太大价值.我还认为,任何人都不可能以 Quick 问题与解决方案的形式给您真正有价值的建议.回答(此处的关键字以粗体显示).我会尝试解释原因.
好吧,似乎所有技术都基于类System.Windows.Controls.Canvas,并且其他UI元素放置在画布上,它们的位置和属性响应于鼠标/键盘输入事件而被修改.您需要从基元中组成更复杂的元素,尤其是,您可以在矢量编辑器中设计一些元素(我强烈建议使用Inkscape, http://en.wikipedia.org/wiki/Inkscape [ ^ ], http://www.inkscape.org/ [
I don''t think that my advice can be too valuable to you. I also think this is not likely that anyone can give you really valuable advice in the format of Quick Questions & Answer (the key word here is shown in bold). I''ll try to explain why.

Well, it looks like all the technique is based on the class System.Windows.Controls.Canvas with other UI elements placed on the canvas, their positions and properties modified in response to mouse/keyboard input events. You need to compose more complex elements out of primitives, in particular, you could design some elements in a vector editor (I would highly recommend using Inkscape, http://en.wikipedia.org/wiki/Inkscape[^], http://www.inkscape.org/[^]), export vector image as XAML and put on your main canvas; you can even do it in runtime to allow your user to add custom vector images. WPF provides a rich set of elements and their properties to depict most complicated diagram.

The problem is: this technological base is nothing compared to some of algorithms I could see on your demos. Automatic re-routing of the links is maybe not the most advanced, convenient or efficient (in the sense of working productivity) in the world but nevertheless quite impressive. I would take many days just for thinking about possible implementations. I know just a bit about this topic as I participated in some diagramming works and know how difficult the advanced link routing can be, as far as algorithm issues go.

I feel this is quite a serious work. A few hours you could possibly save on learning of pure WPF or Silverlight techniques will not advance you too much, in comparison with much bigger work which lies ahead.

Are you sure you cannot simply use that TWave product? Who knows if your own development can be feasible, sufficient in quality and inexpensive enough to be practical…

—SA


这篇关于如何使用wpf绘制复杂的网络拓扑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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