Answered by:
Azure Maps not loading in WPF WebBrowser control

Question
-
Answers
-
The issue is that the WebBrowser control in WPF doesn't have WebGL enabled, and enabling requires a registry change I believe, which is likely not something you will want to do. One way around this is to use Chromium instead of the built in WebBrowser control.
- Proposed as answer by Ricky_Brundritt Wednesday, October 24, 2018 5:25 PM
- Marked as answer by António Sérgio Azevedo - MSFTMicrosoft employee, Moderator Tuesday, October 30, 2018 3:18 PM
All replies
-
Hello Jignesh Macwana,
Can you provide us the error message that you see? Also provide some screenshots if you have.
Thanks!
-
The issue is that the WebBrowser control in WPF doesn't have WebGL enabled, and enabling requires a registry change I believe, which is likely not something you will want to do. One way around this is to use Chromium instead of the built in WebBrowser control.
- Proposed as answer by Ricky_Brundritt Wednesday, October 24, 2018 5:25 PM
- Marked as answer by António Sérgio Azevedo - MSFTMicrosoft employee, Moderator Tuesday, October 30, 2018 3:18 PM
-
-
Do you have Edge installed? If not it will be using the latest version of IE you have installed which may be slow/limited.
Are you able to see any requests for map tiles on the network (.pbf files)?
I haven't used the browser emulation approach in WPF for this, I've always used Chromium instead which works much better.
-
Also try running your target platform to x64. In Windows 10 there is a bug with the webview where WebGL is disabled in x86.
- Edited by Ricky_Brundritt Friday, November 16, 2018 11:50 PM
-
-
I've used both the WPF and WinForm chromium browser in a WPF app and ran the Azure Maps Web SDK successfully. Using the WPF version will allow you to render XAML elements above the map, but will have lower performance due to how Chromium supports this. The WinForm version is just as fast as running the map control in Chrome, but won't allow XAML elements to be overlaid above the map control/browser.
- Proposed as answer by Ricky_Brundritt Monday, May 20, 2019 5:04 PM