Solved! Go to Solution.
I was thinking about binding the map object to a map in view model
Unfortunately, when I set the map in view model as the data context of the map in xaml
<ContentControl Content="{Binding Map}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
In this way, I can just wire up a button command to a command in view model to use the editor.
I was thinking about binding the map object to a map in view model
Unfortunately, when I set the map in view model as the data context of the map in xaml
<ContentControl Content="{Binding Map}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
In this way, I can just wire up a button command to a command in view model to use the editor.
There should be only one instance of the Map class.
If you have a Map property in your VM that holds a Map instance, you can write something like that in XAML:<ContentControl Content="{Binding Map}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
You can use ElementName binding to bind a button to an Editor`s command without a VM.