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.