Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
How to redisplay a floating pane.
posted

I have the following code to programatically add a new split pane witht content.  Once the user close the pane, it stays in the collection.  How can I remove it from the xamDockManagerMain.Panes collection.  I tried remove but that does not seem to actually remove it.  I need to either remove it so that it can be re-added, or how to you display it again once it has been hidden?

 

SplitPane sp = new SplitPane();
sp.Name =
"sp" + chatUser + WindowCount.ToString();
ContentPane cp = new ContentPane();
sp.Panes.Add(cp);
cp.Name =
"cp" + _screenName + WindowCount.ToString();
cp.Header = "Chat " + _screenName + " and " + chatUser;
//cp.CloseAction = PaneCloseAction.RemovePane;
ChatWindow cw = new ChatWindow(_aimSession, _screenName, chatUser);
cw.MinHeight = 100;
cw.MinWidth = 100;
cp.Content = cw;
XamDockManager.SetFloatingLocation(sp, new Point(20, 20));
XamDockManager.SetFloatingSize(sp, new Size(200, 200));
XamDockManager.SetInitialLocation(sp, InitialPaneLocation.DockableFloating);
xamDockManagerMain.Panes.Add(sp);