Last Updated: 03 Jul 2018 16:02 by ADMIN
If you change the value of the Text property of RadBarcodeQR while its Visibility is set to Collapsed and then set it back to Visible, the barcode generates a blurry image.

To work this around you can call the OnApplyTemplate() method of RadBarcodeQR after you change its Visibility to Visible.
Last Updated: 09 Oct 2014 08:52 by ADMIN
Created by: Rebecca
Comments: 1
Category: Barcode
Type: Feature Request
There are solutions posted on the Telerik forums about how to accomplish this using styles but it would save people a lot of time and work (especially if they are using several barcode types) if there was a Boolean property that could be set to hide or display the barcode text (much like the RenderChecksum property is used to hide or display the checksum for the barcode)
Last Updated: 25 Oct 2017 11:47 by ADMIN
When the Background / Foreground property of the RadBarcodeQR control is set, at runtime time that property is ignored.

On loaded, change the pixel value  of the ImageSource of the code in the following manner
(in case the Foreground is set to a valid SolidColorBrush value):

public void RadBarcodeQR_Loaded(object sender, RoutedEventArgs e)
	Image image = this.ChildrenOfType<Image>().First();
	ImageSource src = image.Source;
	Color c = ((sender as RadBarcodeQR).Foreground as SolidColorBrush).Color;
	image.Source = ChangePixelValue(src, c);

public static WriteableBitmap ChangePixelValue(ImageSource src, Color c)
	BitmapSource originalSource = src as BitmapSource;
	WriteableBitmap modifiedSource = new WriteableBitmap(originalSource);

	int h = modifiedSource.PixelHeight;
	int w = modifiedSource.PixelWidth;
	int[] pixelData = new int[w * h];
	int widthInBytes = 4 * w;

	modifiedSource.CopyPixels(pixelData, widthInBytes, 0);

	int colorInt = BitConverter.ToInt32(new byte[] { c.B, c.G, c.R, 0x00 }, 0);
	for (int i = 0; i < pixelData.Length; i++)
		pixelData[i] ^= colorInt;

	modifiedSource.WritePixels(new Int32Rect(0, 0, w, h), pixelData, widthInBytes, 0);
	return modifiedSource;