Select to view content in your preferred language

How to use Sketch graphics without changing the DataContext

526
1
10-09-2017 06:37 PM
RichardRolston
Emerging Contributor

The "Sketch graphics on the map" example changes the DataContext to the SketchEditor.  I don't want to change the DataContext as controls on my window rely on a different DataContext.  How can I get around this?

Sketch graphics on the map—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers 

Tags (2)
0 Kudos
1 Reply
JoeHershman
MVP Regular Contributor

The sample does this so they can bind the button commands directly to the SketchEditor commands.  There is no requirement that this approach is taken.  If you want to bind to the SketchEditor commands you can make a SketchEditor property in your ViewModel (DataContext) and bind through the property

Thanks,
-Joe
0 Kudos