What is the correct Uri scheme for setting a MapIcon in WPF?

Viewed 64

I'm developing a WPF app, using XAML islands, specifically the new MapControl, and I can't manage to replace the standard icon with an image.

I've tried using the URI schemes "ms-appx", "pack://application:,,,/" and "http://". Only the last one works, but I need the images offline. I've been struggling for a few hours with this, trying every possible combination or scheme, triple checking for missing slashes etc. Am I missing something?

var todoIcon = new MapIcon();

todoIcon.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///myImages/Green pin.png"));

"Green pin.png" is in the "myImages" folder. It completely ignores this and just puts the standard icon.

0 Answers
Related