Erik Lindeman is the Director of Product Management & Professional Services at OnTerra Systems. He has over 20 years of experience delivering web-based software services and solutions to enterprise customers at Microsoft and now leads Product Management, Consulting and Solution Development Services at OnTerra Systems.
Although Windows Presentation Foundation (WPF) was initially released by Microsoft in 2006 with .NET Framework 3.0, there are still a huge number of mission critical WPF applications still in use today within a wide range of industries such as logistics, manufacturing, healthcare and banking. For those unfamiliar with WPF – it’s a UI framework for building Windows desktop applications. It uses XAML for UI design, C# or VB.NET for logic, MVVM (Model-View-ViewModel) for the primary design pattern, and it offers vector-based rendering, data binding, animation, styles/templates, and custom controls — all natively supported by Windows.
Migrating your WPF application to use more contemporary Windows-centric approaches such as WinUI, React Native for Desktop, .NET MAUI and Blazor, or rewriting your application to be fully browser-based, can be very time-consuming and may be unnecessary in certain situations. With the deprecation of Bing Maps for Enterprise and the Bing Maps WPF Control, organizations that need maps and geospatial functionality in their WPF applications should upgrade to Microsoft’s modern maps and geospatial platform, Azure Maps.
Specifically, one approach to migrating from Bing Maps to Azure Maps and continuing with your WPF-based application is to use the OnTerra Systems WPF Map Control, which is built on the Azure Maps Web SDK and includes virtually all of the same functionality as the Bing Maps WPF Control, such as road and aerial/satellite map styles, and pushpin, polygon and polyline overlay support. The OnTerra Systems WPF Map Control is a solution that translates Bing Map WPF Control methods to use the equivalent Azure Maps functionality and renders the map using .NET WebView2.
Migrating from the Bing Maps WPF Control to the OnTerra Systems WPF Map Control can be done within a few steps and avoids the need to rewrite your WPF application’s maps functionality.
A map with a pushpin in a WPF application using the Azure Maps-based OnTerra Systems WPF Map Control
Let’s take a closer look at how Azure Maps is implemented in the OnTerra Systems WPF Map Control.
This WPF-based maps solution uses Azure Maps via a wrapper SDK, integrating .NET WebView2 for modern map rendering, and was developed using AI-assisted development tools.
- Middle-layer wrapper using Azure Maps
- A middle-layer wrapper translates all Bing Maps WPF Control properties, tags, and method calls into corresponding Azure Maps Web SDK equivalents.
- The wrapper handles all conversions internally, mitigating the need for developers to rewrite or refactor any maps related logic.
- .NET WebView2 integration
- The WPF control utilizes the WebView2 browser component to render the Azure Maps Web SDK directly within the WPF application, which combines the strengths of both web and native platforms.
- This approach allows the application to leverage modern browser capabilities for map rendering and interactivity, while staying within a familiar WPF environment.
- Use of the Azure Maps Web SDK
- The Azure Maps Web SDK provides faster performance, smoother rendering, and an improved user experience, particularly for interactive maps and real-time updates.
- Building the WPF Map Control solution on the Azure Maps Web SDK provides the opportunity to extend the WPF application to use additional Azure Maps Web SDK features and map styles in the future.
- SDK package for simplified integration
- The solution is packaged as a reusable SDK, rather than exposing APIs directly as this approach is easier for integration and provides developers with a ready-to-use experience.
- Replacing the Bing Maps WPF Control NuGet package with the OnTerra Map Control NuGet package is one of the steps to migrating from Bing Maps to Azure Maps in your WPF application and continues the already-familiar NuGet package-based approach.
Using the OnTerra WPF Map Control approach provides a way for your existing Bing Maps WPF Control code to continue to function without any significant changes, enabling a straightforward migration from Bing Maps to Azure Maps. While there are different possible approaches to bringing the power of Azure Maps to your new or existing Windows applications as mentioned above, the OnTerra Systems WPF Map Control provides:
- No code refactoring required: Existing Bing Maps WPF Control applications can transition to Azure Maps with minimal modifications in your existing application code.
- Ease of integration: The SDK package ensures minimal setup and a plug-and-play experience for developers.
- Faster development and maintenance: The internal middle-layer wrapper handles all complexities, reducing developer effort.
To get access to the OnTerra Systems WPF Map Control or if you’d like to discuss how it can help you seamlessly transition to Azure Maps, please contact OnTerra Systems at https://www.onterrasystems.com/contact.