先马 http://qrcodenet.codeplex.com/
使用该工具WPF生成二维码的简单例子:
前台XAML准备一个Image控件显示二维码。
string qrcodeStr = "www.baidu.com";
QrEncoder qrEncoder = new QrEncoder(ErrorCorrectionLevel.H);
QrCode qrCode = new QrCode();
QuietZoneModules QuietZones = QuietZoneModules.Two;
qrEncoder.TryEncode(qrcodeStr, out qrCode);
var render = new GraphicsRenderer(new FixedModuleSize(2, QuietZones));
var ms = new MemoryStream();
render.WriteToStream(qrCode.Matrix, System.Drawing.Imaging.ImageFormat.Png, ms);
ImageSourceConverter imageSourceConverter = new ImageSourceConverter();
yourImage.Source = (ImageSource)imageSourceConverter.ConvertFrom(ms);