Can you programmatically set the position/width/height of a floating dockpane, or can this only be controlled in the DAML file? I have a number of dockpanes that have their position set to float, to sort of act like a modal window. I know that "closing" and "opening" these panes are simply toggling their visibility, so if a user drags a floating pane somewhere then closes it, it will appear at that same location the next time the user clicks a button to display the pane. Is there a way I can reset the position so it reappears at the center of the screen?
Thanks!
Chris
>>Can you programmatically set the position/width/height of a floating dockpane, or can this only be controlled in the DAML file?
You set the docking behavior in the DAML. You cannot set an explicit position
>>Is there a way I can reset the position so it reappears at the center of the screen?
No
Am I doing something wrong in my DAML? The Pane is starting up docked and not floating? Plus the width doesn't seem to make the Width correct either?
<dockPanes>
<dockPane id="ProMapBlack_DockTool_MATToolDock" caption="MAT Tool" width="750" className="ProMapBlack.DockTool.MATTool.MATToolDockViewModel" dock="float" condition="esri_core_MapPane" delayLoadMessage="Loading ...">
<content className="ProMapBlack.DockTool.MATTool.MATToolDockView" />
</dockPane>
</dockPanes>
If you dock the pane, change its width and close Pro, the next time you open the project it will appear exactly the way it was before you closed it. Use the dock, dockWith, autoHide attributes in the config.daml to set the initial docking state of your dockpane only.
Thanks!
Uma
It would be really nice to be able to float (unpin) a docking pane and remove it's ability to be docked. Also it would be great to be able to center the window or place it's top left corner relative to other panes. I suppose I want a modal window that users can be prompted to perform an action and get the pane out of the way.
Yes it would be nice to be able to "Set Ideal Position" somehow. I can't seem to get the Height/Width to work initially. I understand that it retains the position you set for it after you close it, but I have a grid in my Dock Pane, and the Grid looks much better at a certain Height/Width.
I want to put a button on my dockpane that "Sets Ideal Size/Position". I have a grid in the dock that is used, and it doesn't look good unless it is at a certain width and height. How can i set the Width/Height from code? I can't seem to get this to work. I want my users to be able to just click the button to get the window to the ideal width. I understand that initially it will be docked, and then when you move it, it will retain that position. But I want to be able make this easy for a user. Having problems accomplishing this. I know for a Window it is quite easy, but not having much luck doing it for a user control.