Writeable Bitmap Class in Windows Store App

Writeable Bitmap Class in Windows Store App


WriteableBitmap wb = Image1.Source as WriteableBitmap;
if (wb == null)
BitmapSource bs = Image1.Source as BitmapSource;
wb = new WriteableBitmap(bs); //erroneous line


The above snippet throws the error 'Windows.UI.Xaml.Media.Imaging.WriteableBitmap' does not contain a constructor that takes 1 arguments 

Do we have a constructor which takes one argument?

P.S. : This code doesn't show an error when compiled under visual studio 11 beta. 



3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply


Windows.UI.Xaml.Media.Imaging.WriteableBitmap only contains a constructor that takes two arguments : width and height in pixels.
source : http://msdn.microsoft.com/en-us/library/windows/apps/xaml/br243263

Hi, you are trying to map as a data base?

Leave a Comment

Please sign in to add a comment. Not a member? Join today