I'm using the XamDockManager to organize my layout. I've got several TabGroupPanes to which I add views at runtime. In addition to the built in controls you provide for pinning and unpinning a pane, I also have menu items that allow the user to control the pinned state of these ContentPanes. I'm finding that unpinning is easy, but repinning is not.
I'm probably going about this the wrong way, maybe I should be tapping into this through commands. The way I've got it hooked up now is through event handlers on the item, manually setting the IsPinned property on one of the ContentPane's in the TabGroupPane. The user invokes the pin/unpin action, an event handler is toggling the IsPinned property on the corresponding ContentPane. But once it's unpinned, the TabGroupPane no longer contains a ContentPane, it contains a ContentPanePlaceholder.
Yeah, what we're doing is confusing from a UX perspective. I'll go back to the drawing board and try to use the controls the way they were intended. I think we were confused between pinning and flyout. Thanks for your help.
I'm not sure from your description what you're doing but that is correct that the ContentPane are removed from the TabGroupPane and moved elsewhere when the Pane is unpinned. The ContentPane really doesn't have any strict relation to a given parent - its parent will change as it is unpinned, dragged from one place to another by an end user, have its location changes using one of the available commands (e.g. dockable, floating, document), toggle from docked to floating (e.g. clicking the caption/tab item), etc. The ContentPanePlaceholder is used internally to maintain its position in a given parent for a given state (e.g. floating/docked). It sounds like you're putting some UI on the TabGroupPane itself but that sounds fragile as the ContentPane can be moved elsewhere (not just via unpinning). Perhaps you would put your additional options on the ContentPane itself - e.g. handling the OptionsMenuOpening and adding to its menu items or customizing the PaneHeaderPresenter and putting in your own buttons.