ravenik
ravenik

Reputation: 852

Using MapPoint Control with WPF Application

I try to use MapPoint Control with WPF Application. I added MapPoint to references of my project, then I tried to add Microsoft MapPoint Control 17.0 to a toolbox and nothing was happened (nothing new has appearead in the toolbox). So I tried to use this control directly in code. I found that this contol should be type of: AxMappointControl, so I tried to use it, but it was incorrect. Anyone know how to use MapPoint Control in WPF code? HowI can add this control to my code? How I can add control to the toolbox?

Upvotes: 2

Views: 1404

Answers (2)

ravenik
ravenik

Reputation: 852

I checked it and it seems to be registered. To make sure, I tried once again unregister MappointControl.OCX and register it. But it doesn't change anything. Right now I know where is a problem, but I don't know how to fix it. I work with the application that has to be run in 64 bit Windows and MapPoint control should be run in 32 bit emulation mode. I can embed mappoint control in Windows Forms Control Library and then add references to this library to main application in order to set another emulation mode for mamppoint and another for whole application, but it generate another problem. In this case I get an error "Exception of type InvalidActiveXStateException was thrown". I tried to use this Windows Forms Control Library with the project that was also run in x86 and everything was ok.

Upvotes: 2

winwaed
winwaed

Reputation: 7801

Is MapPoint registered properly with the operating system? If it isn't, Visual Studio will not see the COM objects. MapPoint can be re-registered with the /RegServer command line option or by reinstalling.

Some instructions on how to use the MapPoint control in WPF were posted over at MapForums.

Upvotes: 0

Related Questions