I think that i'm missing something obvious for this one. Attached is a sample application in which I show/hide a pane.
The SplitPane's Visibility is changed to Collapsed when the panes are cleared. I can't manage to get it shown again when adding it back to the dockmanager.
I'm using 2009.2, I'm pretty sure this was working with 2009.1 as this bug seemed to appear when we upgraded versions.
Thanks,
Jamie
The SplitPane Visibility state is being changed when it is removed from the Pane (this makes sense). I'm not sure why I can not set the SplitPane back to visible.
I'm hoping for a work around to what i did in the sample... we need to cache the SplitPanes like I did quickly in the sample.
The control wasn't really meant to be used in this way. The end user can drag a contentpane to a different location in which case its not in the split pane you originally had it in so readding that won't do anything. The end user can unpin a pane in which case its not going to be within a SplitPane so removing the Panes won't remove that pane from the XDM. I'm not sure exactly what you are trying to accomplish so I'll just make a few recommendations.
If you want to hide content panes then you would just enumerate them (e.g. using the GetPanes similar to what I described here) and change their Visibility to Collapsed. Then when you want to reshow them you could just enumerate them again and change their Visibility back to Visible.
If your intention really is to remove them completely from the XDM but you want to be able to reshow them all then you would first call SaveLayout and hold onto that layout string (or save it in a file). Then enumerate the contentpanes, set their CloseAction to RemovePane and call the pane's ExecuteCommand with the Close command as I had in that link. Then when you want to reshow them all you would just call the LoadLayout and all the state information would be preserved.
If your intention is to remove them all but then selectively readd them then you would still have to remove them all as I mentioned above but when you want to reshow them you would have to readd them to the appropriate split pane.
Hi Andrew,
In our situation the close,pin and menu are removed from out panes and they can not be moved by the user (i didn't add this to the sample because that was not the problem).
This was working in 2009.1 just fine.
Serializing out to a file is not really a solution in our case... in our system we have various custom views that all contain their own splitpane. When the user switches views in the ribbon the dockmanager's content is set to the new view while the dockmanager's panes[0] is set to that view's splitpane.
I guess I can keep all the views in the dockmanager panes and lookup the one i need but I'd rather just have the component do what it used to do.
If you have no advise on the example as a work around then i'll change the way that i'm handling the panes
Since this is a change in behavior and it is isn't really necessary that the ContentPane be removed from the SplitPane when that SplitPane was removed from the XDM, I'll submit an issue for that but I do not have a workaround to prevent the current behavior.
Thanks again Andrew,
I ended up caching the SplitPanes in the DockManager.Panes and showed/hide them as required...