1

I create universal project type in vs 2013 for 8.1. In windows phone project i added reference to WriteableBitmapEx via nuget. In references i see WriteableBitmapEx.WinRT. I write code which creates WriteableBitmap from content (use image in project with Content and Dont copy properties). Next i create Image and set source to WriteableBitmap and add image in LayoutRoot grid. In emulator i see this image, thats ok! Next i call DrawLine method from WriteableBitmap and call WriteableBitmap.Invalidate(). I dont see my line...why?

1) Why reference name ends with .WinRT, is this normal? 2) Why invalidate method not work?

NOTE: in windows phone 8 project (not universal) all works properly! And reference name not ends with .WinRT.

Help me please!

Mr White
  • 21
  • 2
  • 1
    For Windows Phone 8.1, non-Silverlight, the *WinRT* version of *WriteableBitmapEx* should indeed be used, see [this changeset](https://writeablebitmapex.codeplex.com/SourceControl/changeset/107895). Not sure about `Invalidate`? – Anders Gustafsson Sep 24 '14 at 14:44
  • Share a small repro project. – Filip Skakun Sep 24 '14 at 15:53
  • I see the same problem here: I can see all library classes in the object browser, but not access them via code. A `using` directive should not be needed in my case, since I'm just interested in `WriteableBitmap` extension methods. – Cedric Reichenbach Oct 26 '14 at 16:07

1 Answers1

1

As already said in my comment, I had the same problem. After hours of confused searching, I finally found this trivial reason:

For universal apps, there are actually two projects: MyProject.Windows and MyProject.WindowsPhone. You need to add the nuget package for both of them (they have separate references) and everything will work.

Cedric Reichenbach
  • 8,970
  • 6
  • 54
  • 89