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
744
Placing Panes with existing panes.
posted

Hello,

When using A Dockmanager you can add panes to the documenthost, I've been adding items (tabs) to the document host programatically.

Now if someone takes a tab from the document host and docks it to the side of the app and then another one and docks above the fist one it moves, you then have 2 areas with multiple tabs in them.

Now, I have various informational windows, record windows and such that are permenantly shown, when a new one is opened it should logically be placed with existing panels of the same kind, so what I'd like to do is:-

If I have the name of a panel, find out if it's docked, and place a new ContentPane "on" it (so that it shows as a new tab with the existing known named contentpanel.

I assume the DockManager creates multiple DocumentManagers when the user takes action like the above, if so, maybe I need to be able to find the documentmanager that contains the relevant documents?

Is that possible?

- Anthony

  • 54937
    Offline posted

    It will depend on where the pane is as to how easy is will be to add a sibling pane. If the panes are within the DocumentContentHost then assuming you have a reference to a ContentPane that you want the new one to be siblings within then you can just use the LogicalTreeHelper.GetParent to get the parent of the pane. For pane's whose PaneLocation is Document that will always be a TabGroupPane so you can just create a new ContentPane, set the properties as needed (e.g. content, header) and then add it to the Items collection of that TabGroupPane. If the pane has been dragged out of the DocumentContentHost and is docked or floating then the logical parent may be either a SplitPane or a TabGroupPane. If the pane is unpinned then there really isn't an easy way to add a pane as its siblings as the parent of the pane is not something that you can add to.