I have two user controls docked with an UltraDockManager, Control1 and Control2. In normal circumstances, if both are unpinned, and the user hovers the mouse over one of the controls, it will flyout with a preview of the control, at which point the user can choose to pin it and use the things in that tab or not. For some reason I can't figure out, in my application if the user hovers over the tab for Control2 and Control1 one hasn't been previewed or pinned, it will preview Control1.
To put it another way: In my application, both controls start out unpinned. So if the user loads the application and immediately hovers over Control2's tab, when the pane flies out for Control2, it is showing Control1. If they hover over Control1 or in some way pin or activate Control1 and then hover over Control2 again, Control2 behaves normally. If the user loads and then uses Control1 first and then Control2, it will preview normally. But if the user loads and tries to only use Control2 they can't because it's painting Control2.
In the BeforeFlyout and AfterHideFlyout events the event argument's .Pane property is referencing the correct user control, but the wrong control's Paint event is being called. Any help or insight?
Solved it!
I had deleted and re-added one of the user controls in the form's designer and somehow the order didn't get entirely switched in the designer file. I just switched the controls' order in the designer file and everything works smoothly now.
So make sure everything necessary gets changed if you change the order of controls docked.
*ETA: 2nd paragraph's last sentence should read "But if the user loads and tries to only use Control2 they can't because it's painting Control1."