1

I would like to display color frame from Kinect for Windows v2 on the WPF window. I want to use MVVM light toolkit.

In tradition way (code behind) I should use:

private void InitializeCamera()
{
    if (_kinect == null) return;
    FrameDescription desc = _kinect.ColorFrameSource.FrameDescription;
    _colorReader = _kinect.ColorFrameSource.OpenReader();
    _colorPixels = new byte[desc.Width * desc.Height * _bytePerPixel];
    _colorBitmap = new WriteableBitmap(desc.Width, desc.Height, 96, 96, PixelFormats.Bgr32, null);
    CameraImage.Source = _colorBitmap;
    _colorReader.FrameArrived += OnColorFrameArrived;
}

In XAML I have:

<Image x:Name="CameraImage" />

So how can I bind data from ViewModel to my view ?

mskuratowski
  • 4,014
  • 15
  • 58
  • 109
  • possible duplicate of [How to bind data from BitmapData to WPF Image Control?](http://stackoverflow.com/questions/11518625/how-to-bind-data-from-bitmapdata-to-wpf-image-control) – goobering May 06 '15 at 12:01

0 Answers0