How can I make a win dock manager pane hidden from the user? My reason for this is to have controls available in the form but not visible. I know I can do this by adding to a normal panel and changing the properties for that, however, it is much nicer developer experience to just have them available on a docking pane that is not visible at runtime.
Thanks
I believe setting the Closed property on a pane to True will hide the pane. Then setting it to False will show the pane again.
I want the same effect in the application. We have the concept of workspaces. So we need to show/hide docked controls when users switches workspace.
In the code we show/hide the control using Close() and Show() method. This works fine in other scenario's except when the control is docked with AutoHide state, on restoring the control using Show() the AutoHide state is losed. The control docking i.e. DockTop, DockLeft is retained.
I tried your suggestion to use the Closed property instead of Close()/Show() method but it still does not work. Anything that I can do to restore the control correctly.
Also based on the documentation, I am assuming the setting the property or calling the method has same effect.
I tried the 'Closed' idea from the designer - which did close it when in design view. However, as the previous poster I presume noted, at runtime the pane is still visible.
To elaborate I wish to at design time show a docking pane and its controls but not at runtime.. Actually a piece of important information maybe, the pane I wish to hide is a tabbed child pane - so its removal shouldnt affect the other pane layouts.
I know the concept can be done because I was able to achieve it whilst doing development with the controls. Unfortunately, I did not need to utilise it at the time and no longer retain how the effect was achieved. I will investigate trying to call the Close method at runtime, just wondering about its placement in the order of events.
Any ideas greatfully received.
" You would need to hide any panes you want hidden at run-time in the Form constructor after the InitializeComponent call"Indeed, thats the approach I have ended up taking - which works fine for me. I can still set the values of its host controls okay and retrieve after I have closed the pane, so it appears to be okay. Thanks
The Close() method is the same as setting Closed to True. However, Show() is slightly different than setting Closed to False. In addition to setting Closed to False on the pane, Show() will walk up the parent chain and also set Closed to False on any closed parent panes. So it is probably better to use Show().
As far as closing an unpinned pane then showing it and having it be pinned, this is actually intended behavior and it is the way Visual Studio behaves. If you would like to change this behavior, you will need to do that manually by caching the pinned state of the tab when it is closed and restoring it when the pane is shown again.
There is no way to show a pane at design-time and hide it at run-time. This is possible for Controls with the Visible property, but not for panes with the Closed property. You would need to hide any panes you want hidden at run-time in the Form constructor after the InitializeComponent call. You can also submit a feature request for this: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.