[GIS] Using WinForms with ArcGIS Pro SDK

arcgis-pro-sdknetreferenceswpf

I want to port a tool developed in ArcObjects for ArcMaps into ArcGIS Pro using the ArcGIS Pro SDK.

The tool's UI was created using WinForms but to recreate the UI in ArcGIS Pro is looks like I would need to use WPF.

I have seen generalized .NET posts online saying that is possible to embed WinForms inside WPF. What I want to know is if it is possible to do so in ArcGIS Pro.

I have not found yet any references or samples of anyone having done it before.

Best Answer

It is technically possible and doable, but building the new ArcGIS Pro .NET Add-in on WPF is the way to go for ArcGIS Pro customizations.

If you are set on embedding WinForms in WPF, you'll use the WindowsFormsHost control.

Below are links to articles and walkthroughs that describe developing for ArcGIS Pro using WPF and MVVM, as well as what you need to do if you are planning to embed WinForms inside of WPF controls.

ProConcepts Migrating to ArcGIS Pro https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Migrating-to-ArcGIS-Pro

ArcGIS Pro SDK for .NET: Intro and Pro Add-in Programming Pattern http://proceedings.esri.com/library/userconf/devsummit-euro17/papers/devsummit-euro_38.pdf

ArcGIS Pro SDK for .NET: UI Design and MVVM http://proceedings.esri.com/library/userconf/proc16/tech-workshops/tw_1853-255.pdf

WPF and Windows Forms Interoperation https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/wpf-and-windows-forms-interoperation

Walkthrough: Hosting a Windows Forms Control in WPF by Using XAML https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/walkthrough-hosting-a-windows-forms-control-in-wpf-by-using-xaml

Walkthrough: Hosting a Windows Forms Composite Control in WPF https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/walkthrough-hosting-a-windows-forms-composite-control-in-wpf

WinForms and WPF: An Integrated Approach https://www.slideshare.net/talentica/winforms-and-wpf-an-integrated-approach

How do I host a Windows Forms control in a WPF application ? https://www.syncfusion.com/faq/929/how-do-i-host-a-windows-forms-control-in-a-wpf-application

Related Question