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
600
Programmatically pinning and unpinning contentpanes in tabgrouppane
posted

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.