diff --git a/src/Uno.UI/UI/Xaml/Media/Imaging/WriteableBitmap.cs b/src/Uno.UI/UI/Xaml/Media/Imaging/WriteableBitmap.cs index 1fa0c5b9d6a5..9a1278210914 100644 --- a/src/Uno.UI/UI/Xaml/Media/Imaging/WriteableBitmap.cs +++ b/src/Uno.UI/UI/Xaml/Media/Imaging/WriteableBitmap.cs @@ -14,7 +14,11 @@ public partial class WriteableBitmap : BitmapSource public WriteableBitmap(int pixelWidth, int pixelHeight) : base() { - _buffer = new UwpBuffer((uint)(pixelWidth * pixelHeight * 4)); + var pixelsBufferSize = (uint)(pixelWidth * pixelHeight * 4); + _buffer = new UwpBuffer(pixelsBufferSize) + { + Length = pixelsBufferSize + }; PixelWidth = pixelWidth; PixelHeight = pixelHeight;