简体   繁体   English

.net Windows窗体项目和.net UWP项目可以合并吗?

[英]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.

相关问题 都引用.NET标准类lib的.NET Windows窗体项目和UWP项目获得: - .NET windows forms project and UWP project that both reference .NET Standard class lib gets: 标准Windows窗体参考.NET Core项目 - Standard Windows Forms reference .NET Core project 引用.NET核心项目中的UWP项目 - Reference a UWP project from a .NET core project 使用 Windows 窗体和 .NET Framework 在 Visual Studio 中创建项目 - Creating a project in Visual Studio with Windows Forms and the .NET Framework 在Windows窗体应用程序中运行ASP.NET项目? - Run ASP.NET project inside a Windows Forms Application? 在不安装.NET 4.0客户端的情况下部署Windows窗体项目 - Deploying windows forms project without installing .NET 4.0 client PowerShell - 如何正确嵌入 Windows Forms 项目 - Z303CB0EF9EDB9082D61BBBE5225D7. - PowerShell - how to properly embed in Windows Forms project - .NET 4.7.2 Xamarin.Forms UWP项目使用.Net Native编译时会引发异常 - Xamarin.Forms UWP project throws exception when compiled with .Net Native 如何将.NET dll引用添加到UWP项目? - How to add .NET dll reference to UWP project? 带有netstandard的Xamarin Forms项目:无法构建UWP - Xamarin Forms Project with netstandard: can't build UWP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM