MishaU
MishaU

Reputation: 708

Using Windows::UI::Xaml::Media::Imaging::WriteableBitmap class in WP8 WinRT Component

I want to port library, which wrote on C++, to WP8 and use it from C# code. I created WP8 WinRT and using C++/CX for this. I need to get bitmap from my WinRT component and it looks like I am a little bit confused with WinRT for Win8 Store App and WinRT for WP8.

Could I use Windows::UI::Xaml::Media::Imaging::WriteableBitmap? If yes how can I add reference to it if no what is the best method get bitmap from WinRT WP8 component in C# code?

Upvotes: 0

Views: 1001

Answers (1)

JustinAngel
JustinAngel

Reputation: 16102

Windows.UI.Xaml namespaces aren't part of WinPRT (Windows Phone Runtime). WriteableBitmap on WP8 is only available to C# so you won't be able to share code that has access to WriteableBitmap. One way you could make this work is to make your shared code use the WriteableBitmap.Pixels array and not the WriteableBitmap itself.

Upvotes: 1

Related Questions