private void CreateBitmap() { bitmap = new WriteableBitmap(viewSize.Width, viewSize.Height, 96.0, 96.0, PixelFormats.Pbgra32, null); }