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
340
I want to change a small behaviour across all UltraDockManagers in my system.
posted

Specifically, want to run this code for all DockManagers:

The thing is, I've got around 50 screens in my program and these dock managers are thrown on most of them, and I don't want to have to go around adding this line of code to each of them and then remember to do it every time I add a new one.

Is there some sort of Global OnDockManagerCreated event I can hook onto somewhere?

Thanks.

 

        private void ultraDockManager1_BeforePaneButtonClick(object sender, CancelablePaneButtonEventArgs e)
        {
            if(e.Button == PaneButton.Close)
            {
                DockableControlPane p = e.Pane as DockableControlPane;

                if(p != null)
                {
                        e.Pane.Dock(true);
                        e.Pane.Unpin();
                        ultraDockManager1.FlyIn(false);
                        e.Cancel = true;
                }
            }
        }

Parents Reply Children
No Data