AnsweredAssumed Answered

Finding built-in Dockpane throws

Question asked by sgourley on Jul 23, 2018
Latest reply on Aug 1, 2018 by sgourley

The following code

varpane = FrameworkApplication.DockPaneManager.Find("esri_editing_AttributesDockPane");

pane.Pin();

pane.Activate(true);

Will throw the following exception

System.AggregateException HResult=0x80131500 Message=A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. Source=mscorlib StackTrace: at System.Threading.Tasks.TaskExceptionHolder.Finalize() Inner Exception 1: NullReferenceException: Object reference not set to an instance of an object.

Not one single line will cause the issue. It's like the code queue's up some tasks and when they run, it will delayed fail. Upon further inspection, the calling code does nothing, but when trying to open the pane it will then throw.

 

The same thing seems to happen if the pane is visible if I comment out `Pin()` and/or `Activate(true)` it will still throw.

 

I've had similar experience with using the show attributes button command. 

 

What is the proper way to display the attributes for a feature that has just been created so the user can directly start editing?

Outcomes