I wrote previously about using WPF textbox for automatic spellchecking. In this blog, I will actually talk about a real WPF Visualization that I have been playing with for a while. I didn’t want to build a visualization from scratch, so I searched for an existing WPF solution with source code that I could use for my Add-in. I found WPF Dynamic Data Display built by Microsoft Research that is used for many solutions.
My goal was to display sales data from Dynamics NAV in an interactive map that you could zoom in and out and it would be a nice demo tool. The data for Longitude and longitude on map would come from customer card, and the sale data would come from transactions. I had previously blogged about how to use geo codes for address verifications; you could use that to update all the customers’ coordinates. You would need to add two new fields to the customer table. In my example, I didn’t want to modify existing objects so I’m simply loading a CSV file with data.
Here is a screenshot of how it looks in NAV.
The user can interact with the map and zoom in and out of the map, change attenuation and color of the data.. I hope you’ll find this example interesting. I’ve attached the Visual Studio solution with 4 projects inside. MapSample is setup as starting project and it uses the DynamicsDisplay.Control to display the same information. The “DynamicsNAV WPF AddIn2” creates the NAV Add-in WPFDynamicMap.dll file. The solution uses 3 external DLL file in addition to the WPFDynamicMap.dll. In order for NAV reference these DLL files, they need to be put in the Role Tailored client folder, instead of the Add-ins folder. If you forget to do this the page will not open up and you’ll see the error in event log. When compiling the project, make sure example_for_visualization.csv is in C drive, you can change in the code as well.
*This post is locked for comments