I have an ArcGIS Pro button add-in that opens a WPF window when clicked. If I wrap the OnClick handler code in QueuedTask.Run() the CIM works and I'm able to pan/zoom in the map view, but the TOC is still disabled.
I would like the user to be able to turn layers on/off and move the order around while the window is open. How might I enable this? When I use a dockpane this seems to be automatic but now I'm opening a (non-ArcGIS) WPF window.
<SPAN class="keyword token">internal</SPAN> <SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">ShowExporterWindow</SPAN> <SPAN class="punctuation token">:</SPAN> Button
<SPAN class="punctuation token">{</SPAN>
ExporterWindow window<SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">override</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">OnClick</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
QueuedTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Run</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="punctuation token">{</SPAN>
window <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ExporterWindow</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
window<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ShowDialog</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>