chazwrob

MVVM for Graphics Overlays

Discussion created by chazwrob on Dec 8, 2018
Latest reply on Dec 10, 2018 by chazwrob

Most WPF .Net 100.X samples use a Static Resource of the Map object declared in the xaml file. Then the Map property of the MapView control is set to Static Resource instance. I would like to do the same for Graphics overlays but this does not seem to be possible. The exposed Overlays property is for an unrelated Items control. Sure, I can use the somewhat confusing approach as is demonstrated in the "Controller" samples (demonstrates injecting a "weak" reference to the MapView into the view model to control, for example, the map viewpoint from the ViewModel), but is there no more straight forward  way?

Outcomes