Mapview from WPF to winForm

2321
1
07-29-2015 10:19 AM
Labels (1)
Highlighted
New Contributor

Trying to use the Map View tool which is made for WPF in a WinForms project and I have the ElementHost set up and ready to take a UserControl but, when I try setting up the User control, it won't allow me to put the Map View Tool into the WPF User Control. It is just greyed out saying I can't use it which doesn't make sense to me. Anyone know why it won't let me put the Map View into the User Control? Any fixes? Thanks in advance!Capture.PNG

Reply
0 Kudos
1 Reply
Highlighted
New Contributor III

I had a similar issue where I got an error message about an invalid invocation of the constructor for my WPF user control.

I got around this by adding an empty ElementHost to my WinForm and then adding the control through code:

        public Form1()
        {
            InitializeComponent();
            elementHost1.Child = new MyWPFUserControlLibrary.UserControl1();
        }
Reply
0 Kudos