Question

I have a WPF application targetting .Net framework 4.5 in Visual Studio 2012.

I have added references to GMap.NET.Core and System.Data.SQLLite.

In my App.config I have added

   <startup useLegacyV2RuntimeActivationPolicy="true"> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
    </startup>

I open my Map.xaml page in VS, open the toolbox, right click, hit choose items.

Change tab to .NET Framework Components, Browse, select GMap.Net.WindowsForms.dll. I see the entry for GMapControl pop up in the list, it's checked, I hit OK, I am then presented with the following:

enter image description here

I never end up seeing the control in my toolbox. Help!

Edit: If I right click and hit Show All, I do see the control, it's just greyed out.

Was it helpful?

Solution

Bit late but just in case it helps anyone:

for WPF there is a different GMap.net to download: GMap.NET.WindowsPresentation

Once you have this:

  • Add the GMap.NET.Core.dll and GMap.NET.WindowsPresentation.dll into your project file
  • Add references to GMap.NET.Core.dll and GMap.NET.WindowsPresentation.dll
  • Add in the toolbox by browsing to GMap.NET.WindowsPresentation.dll

If you get a message about

"the assembly could not be loaded this assembly may have been downloaded from the web"

then you need to change the properties of the two .dll files and unblock them.

I found this guide helpful, although it is for Windows Forms, not Windows Presentations:

http://www.websofia.com/2013/02/gmap-net-tutorial-maps-markers-and-polygons/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top