Is there an event that gets sent when a pane is pined/unpinned? I have several windows that I would like to "disable" when they are pined and re-enable when they are pinned. I would also be interested in an event that gets sent when the panel is revealed; i.e., when it slides out from the pined area to allow the user to pin it.
Hello,
Thank you for the provided information. I believe that other community members may benefit from this.
Thanks again.
Another easy solution would be this one:
// Works only for pinning because unpinned panes are not in the same visual tree.
dockManager.AddHandler(ContentPane.ExecutedCommandEvent, new EventHandler(OnCommandExecuted));
// This will cover both events, but requires that each content pane gets an event handler assigned.
ContentPane dockContent = new ContentPane(); dockContent.ExecutedCommand += this.OnCommandExecuted;
private void OnCommandExecuted(object sender, ExecutedCommandEventArgs e) { if (e.Command == ContentPaneCommands.TogglePinnedState) { // Do something. } }
Hi,
I want to achieve similar functionality. i had tried this Code but i am not getting Pinned and unpinned event in XAMl. please help
yeah noticed that a few minutes later :)
Thanks
Just as in the xaml case you still have to set the RaisePinEvents (e.g. "ContentPaneEvents.SetRaisePinnedEvents(pane, true)" ).