AnsweredAssumed Answered

ArcMap custom dockable window Position & State on ArcMap load

Question asked by mik1971 on Aug 22, 2018

Hi,

 

We have an Add-in as a custom dockable window.

We need to have it on the left, hidden, visible on ArcMap New Document event (in other words - on ArcMap load)

like on the picture:

  • Hidden—When the dockable window is hidden or minimized to a desktop application, it saves screen space for the user. When the user hovers over the dockable window, it will be exposed again, but once the dockable window loses focus, it returns to the state represented in the following screen shot. The following ArcMap Dockable Window is next to a hidden TOC in ArcMap to show that in a hidden state, it appears like a tabbed item:

How to create an add-in dockable window—ArcObjects 10.4 Help for Java | ArcGIS for Desktop 

 

CustomExtension.cs

IDockableWindowManager dockableWindowManager = ArcMap.Application as IDockableWindowManager;
   UID dockWinID = new UIDClass();
   dockWinID.Value = "Some_Value";
   dockableWindow = dockableWindowManager.GetDockableWindow(dockWinID);
   dockableWindow.Dock(esriDockFlags.esriDockLeft | esriDockFlags.esriDockHide | esriDockFlags.esriDockUnPinned);

 

Config.esriaddinx

<AddIn language="CLR" library="Some.dll" namespace="SomeNS">
  <ArcMap>
    <DockableWindows>
      <DockableWindow id="SomeID" class="Some+AddinImpl" caption="Some" image="Images\Some.png" >
        <InitialPlacement height="300" width="300" state="hidden" position="left"/>
     </DockableWindow>

...

 

What are the correct settings in order to get the Position&State I describe?

 

ArcMap 10.6.1, C#

 

Please help.

Outcomes