Q:

WP7 - How to bind the Bitmap from ViewModel?

I have bit map in View Model. Now I want to bind to the XAML from View Model. 
 public static String _imgQRCode;
        public String imgQRCode
        {
            get { return _imgQRCode; }
            set { this.RaiseAndSetIfChanged(x => x.imgQRCode, value); }
        }

Bit Map:-
imgQRCode = GenerateQRCode(phoneNumber).ToString();

GenerateORCode:-
private static WriteableBitmap GenerateQRCode(string phoneNumber)
        {
            BarcodeWriter _writer = new BarcodeWriter();

            _writer.Renderer = new ZXing.Rendering.WriteableBitmapRenderer()
            {
                Foreground = System.Windows.Media.Color.FromArgb(255, 0, 0, 255),
            };

            _writer.Format = BarcodeFormat.QR_CODE;

            _writer.Options.Height = 400;
            _writer.Options.Width = 400;
            _writer.Options.Margin = 1;

            var barcodeImage = _writer.Write("tel:" + phoneNumber);
            return barcodeImage;
        }

Here i can not bind the image. Please let me any idea to bind the image from viewModel.
Thanks in advance.

A:

You can not bind the image to string.
So long as datacontext is correct for your  tag, you should define a property for the bitmap, e.g. 
WriteableBitmap QRCode { get; set; } // Implement INotifyPropertyChanged the way you do it

Then have QRCode set in your other property setter, like so:
public String imgQRCode
        {
            get { return _imgQRCode; }
            set 
            { 
              this.RaiseAndSetIfChanged(x => x.imgQRCode, value); 
              this.QRCode = GenerateQRCode(value);
            }
        }

then in XAML you can do <Image Source="{Binding Path=QRCode}" />

