使用ab4d-viewersvg将svg文件转换为xaml [英] Svg file convert into xaml using ab4d-viewersvg

查看:79
本文介绍了使用ab4d-viewersvg将svg文件转换为xaml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要一个解决方案将SVG文件转换成XAML最后需要移位



svg文件到我的wpf应用程序。



需要一步一步的程序示例



如果我得到这个例子calliburn微框架工作......我很高兴。





这是我的gmail:[删除] @gmail.com



删除了SHOUTING,删除了电子邮件 - OriginalGriff [/ edit]

解决方案

我知道只有一个开放 - 源代码确实是,但非常好,非常好:Inkscape:

http:// en .wikipedia.org / wiki / Inkscape [ ^ ] ,

http://inkscape.org/download/?lang=en [< a href =http://inkscape.org/download/?lang=entarget =_ blanktitle =New Window> ^ ](此pa ge显示了下载源代码的位置。)



当SVG到XAML导出首次引入时,它并没有真正起作用,但在最近的版本中它运行得非常好。我经常为我做的WPF开发提供建议,并且它工作得非常好。所以,你可以在源代码中找到这个操作,看看它是如何工作的。



如果你需要在你的.NET代码中实现它,那将是相当多的工作。首先,您可以将代码转换为C#。另一种选择是使用P / Invoke。



如果您需要学习P / Invoke,请从这里开始:

http://en.wikipedia.org/wiki/P/Invoke [ ^ ],

http://msdn.microsoft.com/en-us/library/Aa712982 [ ^ ]。



此CodeProject也很有用: Essential P / Invoke [ ^ ]。



P / Invoke的另一种替代方法是使用C ++ / CLI混合模式(托管+非托管)项目。此项目可以构建全局钩子所需的DLL,但它可以包含一些托管包装器CLI代码,因此,从.NET应用程序的角度来看,您可以将其用作常规.NET程序集,即引用它。请参阅:

http://en.wikipedia.org/wiki/C %2B%2B / CLI [ ^ ],

http://www.ecma-international .org / publications / standards / Ecma-372.htm [ ^ ],

http:/ /msdn.microsoft.com/en-us/library/xey702bw.aspx [ ^ ],

http:/ /msdn.microsoft.com/en-us/library/3bstk3k5 [ ^ ]。



-SA

Hi,

I need a solution convert SVG file into XAML finally need to displaty

svg file to my wpf application.

need step by step procedure example

if i get this example calliburn Micro frame work .. i am very happy.


this is my gmail : [DELETED]@gmail.com

[edit]SHOUTING removed, Email deleted - OriginalGriff[/edit]

解决方案

I know just one open-source code that does is, but a very good one, amazingly good: Inkscape:
http://en.wikipedia.org/wiki/Inkscape[^],
http://inkscape.org/download/?lang=en[^] (this page shows where to download source code).

When SVG to XAML export was first introduces, it wasn''t really functional, but in recent version it works extremely well. I often advise it for WPF development which I did, and it worked very well. So, you can find this operation in source code and see how it works.

If you need to implement it in your .NET code, it will be considerable amount of work. First, you can just translate the code to C#. Another option is to use P/Invoke.

If you need to learn P/Invoke, start from here:
http://en.wikipedia.org/wiki/P/Invoke[^],
http://msdn.microsoft.com/en-us/library/Aa712982[^].

This CodeProject can also be useful: Essential P/Invoke[^].

One alternative to P/Invoke is to use C++/CLI mixed-mode (managed+unmanaged) project. This project could build a DLL required by the global hooks, but it can contain some managed wrapper CLI code, so, from the standpoint of your .NET application, you can use it as a regular .NET assembly, that is, reference it. Please see:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx[^],
http://msdn.microsoft.com/en-us/library/3bstk3k5[^].

—SA


这篇关于使用ab4d-viewersvg将svg文件转换为xaml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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