如何在WPF中绘制QR码 [英] How to draw a QR code in WPF

查看:64
本文介绍了如何在WPF中绘制QR码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有人可以分享一个样本来在WPF中绘制二维码。



问候,

sajith

解决方案

您可以找到许多带有详细文档的产品,但我担心其中大多数都是专有和商业的:



http://bit.ly/A1jTec [ ^ ]。



在开源域名中,查看它out: http://twit88.com/home/opensource/qrcode [ ^ ]。



此代码不是WPF,但这不是太糟糕:它可以生成位图;你可以在WPF中使用它。如果是WPF,你甚至可以使用 System.Drawing 位图:有一个用于转换为WPF位图的互操作模块:

http://msdn.microsoft.com/en-us/library/system.windows.interop。 imaging.aspx [ ^ ]。



-SA


这里有一个简单的例子 https://www.dropbox.com/s/mrpjoeesmdr9ufj/QREjemplo.rar [ ^ ]


如果你正在寻找以矢量格式呈现的QR码生成器(因为这是WPF绘图API工作的本机方式),那么你可以试试这个这个包来自nuget [ ^ ]

hi,
Can some one share a sample to draw a QR code in WPF.

Regards,
sajith

解决方案

You can find a number of products with detailed documentation, but I'm afraid most of them are proprietary and commercial:

http://bit.ly/A1jTec[^].

In an Open-Source domain, check it out: http://twit88.com/home/opensource/qrcode[^].

This code is not WPF, but this is not too bad: it can generate a bitmap; and you can use it in WPF. You can even use System.Drawing bitmaps if WPF: there is an interop module for that purpose to convert to WPF bitmaps:
http://msdn.microsoft.com/en-us/library/system.windows.interop.imaging.aspx[^].

—SA


Here you have a simple example https://www.dropbox.com/s/mrpjoeesmdr9ufj/QREjemplo.rar[^]


If you're looking for a QR Code generator that renders in vector format (as this is the native way WPF drawing API works) then you could try this this package from nuget[^]


这篇关于如何在WPF中绘制QR码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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