[英]can .net windows forms project and .net UWP project be merged?
I have a GUI windows form app written in .NET . 我有一个用.NET编写的GUI Windows窗体应用程序。
And I have a new .NET UWP app that has UWP camera and UWP sockets. 我有一个新的.NET UWP应用程序,其中包含UWP摄像头和UWP套接字。
Can I port the UWP camera and UWP sockets code into the .NET Windows form app project? 是否可以将UWP摄像机和UWP套接字代码移植到.NET Windows窗体应用程序项目中?
(If I went the other way, it probably will take much longer to port the Windows forms GUI into a UWP GUI.) (如果我采取其他方法,则将Windows窗体GUI移植到UWP GUI中可能会花费更长的时间。)
WinForm project can use most new Windows 10 API designed for UWP. WinForm项目可以使用为UWP设计的大多数新Windows 10 API。 Check this post .
检查这篇文章 。
If went the other way, you need to port bit by bit of the existing GUI, so it all depends how complex your WinForm GUI is. 如果采用另一种方法,则需要逐位移植现有的GUI,因此这完全取决于WinForm GUI的复杂程度。
The first challenge is you are using XAML, another language instead of C# to write UWP UI. 第一个挑战是您正在使用XAML(另一种语言而不是C#)编写UWP UI。
Some WinForm controls you are using just do not have a UWP counterpart, you need to turn to the community to check if there are alternatives that are freely available l, or purchase proprietary product, or write your own control. 您正在使用的某些WinForm控件只是没有UWP控件,您需要转向社区检查是否有可免费使用的替代产品,购买专有产品或编写自己的控件。
No. WinForm and UWP projects are very different. 否。WinForm和UWP项目非常不同。 UWP are compiled to native code and WinForm are compiled to IL that are then run by the CLR.
将UWP编译为本机代码,将WinForm编译为IL,然后由CLR运行。 Microsoft is currently working on the ability to put a UWP control inside a WinForm application.
Microsoft当前正在研究将UWP控件放入WinForm应用程序中的功能。 You can check it out here .
您可以在这里查看 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.