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
150
Floating, docked, pinned events
posted

I don't see any offhand from ContentPane but I'm hopeful, is there any event fired to notify when a pane who is docked is set to floating and vice-versa.

I have a control which is stopping certain processes on unload but I want to distinguish between unload because the user selected a different tab and unload because the tab was set to floating (or docked or dragged out of the tabgroup, etc...)

 

  • 54937
    Verified Answer
    Offline posted

    There isn't an event when the PaneLocation property has changed but you could create one similar to how I described creating Pinned/Unpinned events here. That being said you may still not be able to tell at the point when the WPF framework actually invokes the Unloaded event what is causing the unload so the best thing to do may be to defer stopping the processes - e.g. use the Dispatcher.BeginInvoke to start an async callback and then when that occurs check if the process should be stopped (e.g. checking the IsVisible of the element or some other state).