private void Options_InfraredStreamChanged(bool isEnabled) { if (isEnabled) { _colorBitmap = new WriteableBitmap(_kinectManager.ColorFrameWidth, _kinectManager.ColorFrameHeight, 96.0, 96.0, PixelFormats.Gray16, null); _kinectManager.EnableInfraredStream(); _colorEnabled = true; } else { _colorBitmap = new WriteableBitmap(_kinectManager.ColorFrameWidth, _kinectManager.ColorFrameHeight, 96.0, 96.0, PixelFormats.Bgr32, null); _kinectManager.EnableColorStream(); } ColorStreamImage.Source = _colorBitmap; }