我在8.1中为vs 2013创建通用项目类型。 在windows phone项目中,我通过nuget添加了对WriteableBitmapEx的引用。在参考文献中,我看到了WriteableBitmapEx.WinRT。我编写从内容创建WriteableBitmap的代码(使用Content和Dont复制属性在项目中使用图像)。接下来,我创建Image并将源设置为WriteableBitmap,并在LayoutRoot网格中添加图像。在模拟器中,我看到这个图像,多数民众赞成在! 接下来,我从WriteableBitmap调用DrawLine方法,并调用WriteableBitmap.Invalidate()。 我没有看到我的线...为什么?windows phone 8.1中的writeablebitmap
1)为什么参考名称以.WinRT结尾,这是正常的吗? 2)为什么invalidate方法不起作用?
注:在Windows Phone 8项目(不通用)所有工作正常!参考名称不以.WinRT结尾。
请帮帮我!
对于Windows Phone 8.1,非Silverlight,* WinRT * *版本的* WriteableBitmapEx *的确应该使用,请参见[this changeset](https://writeablebitmapex.codeplex.com/SourceControl/changeset/107895)。不确定'无效'? – 2014-09-24 14:44:08
分享一个小的repro项目。 – 2014-09-24 15:53:52
我在这里看到同样的问题:我可以在对象浏览器中看到所有库类,但不能通过代码访问它们。在我的情况下,不应该使用'using'指令,因为我只是对'WriteableBitmap'扩展方法感兴趣。 – 2014-10-26 16:07:24