We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to host Maps.WPF to WinForms?

Platform: WinForms |
Control: Maps

You can host the WPF Map control into WinForms by following the given steps:

  1. Create a new project and select the WPF User Control Library template under the Windows Desktop category.
  2. Initialize the maps control and define the required features either in the UserControl1.xaml or UserControl1.cs file available in the created WPF user control library.
  3. Create a new Windows Forms Application template under the Windows Desktop category.
  4. In the Solution explorer of windows forms application, right-click and add the WPF User Control Library as existing project.
  5. Add this library project as reference to the Windows Forms Application by clicking Add Reference in RefernceManager of WinForms application.
  6. Initialize and add the UserControl1 defined in the WPF user control library in the Form1.cs file.
    Note:

    Add the following references in WPF User Control Library.

    • WindowsBase
    • PresentationCore
    • PresentationFramework
    • System

     

    Add the following references in Windows Forms Application.

    • PresentationCore
    • PresentationFramework
    • System.Xaml
    • WindowsBase
    • WindowsFormsIntegration

     

Sample for host the WPF maps control into WinForms: https://www.syncfusion.com/downloads/support/directtrac/general/ze/WFHost-1254467776

 

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile