在开发Windows 8应用System.Drawing中更换 [英] Replacement of System.drawing in developing windows 8 apps

查看:136
本文介绍了在开发Windows 8应用System.Drawing中更换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何一个可以告诉我什么是在开发Windows 8应用程序替换System.Drawing中的。我试过,但System.Drawing中它不是由Windows 8的应用程序支持。我必须使用Image.FromFile(),但它显示在Windows 8这是工作在控制台应用程序精细错误。

Can any one tell me what is the replacement of System.Drawing in developing windows 8 apps. I tried System.Drawing but it is not supported by windows 8 apps. I have to use Image.FromFile() but it is showing error in windows 8. It is working fine in console application.

推荐答案

也许这篇文章从MSDN可以帮助你: 基于矢量绘图XAML样品< 。/ STRONG>

Perhaps this article from MSDN might help you out: XAML vector-based drawing sample.

样品覆盖:


  • 图使用矩形,线条,椭圆,多边形类基本形状。

  • 将笔触和填充值来定义形状的轮廓和内饰的外观。

  • 将一个一个LinearGradientBrush填充。通过设置剪辑属性裁剪元素。

  • 绘制复杂,使用含有各种形状,人物,和贝塞尔曲线路径元素复合形状。

  • Drawing basic shapes using the Rectangle , Line , Ellipse , and Polygon classes.
  • Applying Stroke and Fill values to define the appearance of the outline and interior of the shape.
  • Applying a LinearGradientBrush fill. Clipping elements by setting the Clip property.
  • Drawing complex, compound shapes using Path elements that contain various shapes, figures, and Bezier curves.

编辑:

相反System.Drawing命名空间中,对于Windows 8还有就是< A HREF =htt​​p://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.imaging.aspx相对=nofollow> Windows.Graphics.Imaging命名空间 。如果你跟随链接,你会发现几个样品/文章解释如何的 过程图像文件 ,如何的 编码 (从文件映像)或的 解码 (从文件映像)或如何的 编辑图片

Instead of the System.Drawing namespace, for Windows 8 there is the Windows.Graphics.Imaging namespace. If you follow the link you'll find several samples/articles explaining how to process image files, how to encode (file from image) or decode (image from file) or how to edit an image.

希望这可以帮助你更进一步! :)

Hope this helps you out further! :)

这篇关于在开发Windows 8应用System.Drawing中更换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆