예제 #1
0
        private void CopyButton_Click(object sender, RoutedEventArgs e)
        {
            // put the QR code on the clipboard as a bitmap
            var qrCode     = QrCode.EncodeText(_text, ErrorCorrection);
            var bitmap     = QrCodeDrawing.CreateBitmapImage(qrCode, 20, BorderWidth);
            var dataObject = new DataObject();

            dataObject.SetData(DataFormats.Bitmap, bitmap);
            Clipboard.SetDataObject(dataObject);
        }
예제 #2
0
        private void UpdateQrCode()
        {
            var qrCode = QrCode.EncodeText(_text, ErrorCorrection);

            QrCodeImage.Source = QrCodeDrawing.CreateDrawing(qrCode, 192, BorderWidth);
        }