WIndows universal app with system.drawing and possible alternative

天涯浪子 提交于 2019-11-28 06:29:16

问题


I'm developing a windows universal app and i need to work with Bitemap but

i cannot seem to reference System.Drawing,

Why cant windows universal app cannot reference this dll and what alternative do i have?

Edit Any suggestions on how can i use my already written filtering library (that depends on system.drawing) in a universal app?

Tnx


回答1:


System.Drawing is the .NET namespace for working with GDI+. This technology is not available for Windows Store apps or universal Windows Apps. See .NET for Windows apps.

You can make use of the Win2D project for a WinRT wrapper usable from C# for drawing with Direct2D/DirectWrite which are also supported for Windows Store apps and UWP. See Introducing Win2D: GPU accelerated 2D graphics programming in the Windows Runtime.

You can make use of SharpDX which provides wrappers for Direct2D, DirectWrite, and the Windows Imaging Component (WIC).

In short: You can't use an existing library that makes use of System.Drawing in a universal Windows Application.




回答2:


Cross platform System.Drawing

This may not directly address the question. The project makes System.Drawing available to Linux and Mac osX10. Having support for UWP platform could help the transition to Windows.UI while porting/testing code from WinForm to UWP.



来源:https://stackoverflow.com/questions/31545389/windows-universal-app-with-system-drawing-and-possible-alternative

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!