Search code examples
c#xamlwindows-store-appsuwpwin-universal-app

Can WriteableBitmap only be written-to once?


I'm setting an Image's Source to a WriteableBitmap, and I'm populating that WriteableBitmap using its PixelBuffer. The first time I write to it, it works. But subsequent writes are ignored. Why?

I'm using:

Stream s = myWriteableBitmap.PixelBuffer.AsStream()

(it's in a using. and I'm not getting any exceptions)


Solution

  • Following Rob Claplan's answer you should call Invalidate after performing changes to your Bitmap.