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.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.