无法使用WriteableBitmapEx.WinRT在项目中看到WriteableBitmapEx [英] Unable to see WriteableBitmapEx in project using WriteableBitmapEx.WinRT
问题描述
我想在我的Window Store应用程序中添加WriteableBitmapEx lib。我只是看了一下Manage NuGet包查找并找到了WriteableBitmapEx并安装了它。没问题。
C#项目。
我检查了我的参考资料,在那里我可以看到WriteableBitmapEx.WinRT 。即使我能够在我的对象浏览器中看到。
现在我想在我的代码中使用它但我无法找到使用WriteableBitmapEx.WinRT
VS 2012给我错误,无法找到它。
我做错了什么?有什么想法吗?
你的帮助非常大。
祝你好运
AghaKhan
I would like to add WriteableBitmapEx lib in my Window Store Application. I just just looked with Manage NuGet packages find and found WriteableBitmapEx and installed it. No problem.
C# project.
I checked my References and there I can see WriteableBitmapEx.WinRT. Even I was able to see in my Object Browser.
Now I wanted to use it in my code but I am unable to find using WriteableBitmapEx.WinRT
VS 2012 is giving me error, unable to find it.
What I am doing wrong? Any Idea?
Your help will be very much appriciated.
Best regards
AghaKhan
推荐答案
WriteableBitmapEx是WriteableBitmap的扩展。所以只需使用WriteableBitmap图像。
工作正常
无效MainPage_Loaded(对象发送者,RoutedEventArgs e)
{
WriteableBitmap writeableBmp = new WriteableBitmap(512,512);
writeableBmp.Clear(Colors.White);
writeableBmp.DrawLine( 1,2,30,40,Colors.Green);
ImageName.Source = writeableBmp;
}
ImageName是xaml中的图像文件。
就是这样。
WriteableBitmapEx is extension to WriteableBitmap. So just use as WriteableBitmap image.
It works fine
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
WriteableBitmap writeableBmp = new WriteableBitmap(512, 512);
writeableBmp.Clear(Colors.White);
writeableBmp.DrawLine(1, 2, 30, 40, Colors.Green);
ImageName.Source = writeableBmp;
}
ImageName is an image inside xaml file.
That is all.
这篇关于无法使用WriteableBitmapEx.WinRT在项目中看到WriteableBitmapEx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!