Hi – I’m working with the ArcGIS Pro sdk 3.0 and have a DockPane view model that contains a MapTool. I'd like to get a reference to the DockPane View Model from the MapTool class code to set some properties back on the DockPane. In the code below I’m getting an error ‘DockPane is a type, which is not valid in the given context’. Is there a way I can correct this? I’ve seen this work getting a reference to an EmbeddableControl ViewModel in the SequentialNumberTool Sample (https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Editing/SequentialNumberTool/SeqNumTool.cs)
…
using ArcGIS.Desktop.Framework.Contracts;
…
internal class LandscapeSelectionTool : MapTool
{
Dockpane1ViewModel _vm;
…
protected override Task OnToolActivateAsync(bool active)
{
_vm = DockPane as Dockpane1ViewModel;//Error occurs here
return base.OnToolActivateAsync(active);
}
…
}
Thanks
Pete