The WriteableBitmapEx library provides a generic factory method for constructing writeable bitmaps, namely BitmapFactory.New
. Use this portable method instead to generate your dummy writeable bitmap:
WriteableBitmap writeableBmp = BitmapFactory.New(0, 0).FromResource("Data/flower2.png");
The BitmapFactory
class is in the System.Windows.Media.Imaging
namespace (unless you are using the WinRT version of WriteableBitmapEx, where it is in the Windows.UI.Xaml.Media.Imaging
namespace).