M
Mike Fechner
Guest
Let me start with two assumptions: a) When you say "undocking" a form, you actually set the child forms MdiParent property to ? at runtime. Causing the Form to be re-realized as a stand along form. b) Your SetShortcutKeys method contain a couple of statements like this here: ultraToolbarsManager1:Tools["ButtonTool2"]:SharedProps:Shortcut = Shortcut:F7 . Then I'm able to reproduce this in a very simple test case. I must say I am not surprised that this "can" happen. First you must understand, that when you "undock" the Form, the .NET Framework actually recreates the Form. The Form's "Handle" (the reference to the Form in the Windows Desktop API) is a new one and all .NET Controls on the form have to become recreated as well. Secondly, when the MdiMerging of the UltraToolbarsManager is used, you are actually not interacting with the MdiChild UltraTooblarsManager at all. All the buttons, Ribbon Bands, etc. are shadowed on the MdiParent's band. So after undocking you are actually dealing with the Ribbon of the MdiChild for the first time (on actually a new Ribbon on a new form). I tried fixing the issue by re-assigning the function key after "undocking" the form. This does not change anything. So it seems that the issue is not caused by Infragistics potentially losing the function key properties along the way. Sounds more like they are not getting registered against the new Windows desktop resources that were created after "undocking" the form (new Form, new Ribbon). Sounds like an Infragistics issue to me. But they may respond that it was never intended to work that way at all ... when you talk to them you should be clear that you are divorcing an MdiChild form it's MdiParent. "Undocking" has a different meaning for them (related to the UltraDockManager which you are not using in this scenario; and anyway Ribbon in dockable panes and UltraDockManager don't play together at all). What obviously works as an alternative to the "Shortcut" key definitions is the KeyPreview functionality of the form. That works for the MdiChild Form before and after your "undocking". https://msdn.microsoft.com/en-us/library/system.windows.forms.form.keypreview(v=vs.110).asp You'll receive all key events in the form in the form's KeyDown event. From the Form itself and all controls in the Form. There are two drawbacks: a) It may get called very often (client.log file get's polluted) b) Users won't see the function key assignments in a menu or context menu next to the menu item label (right aligned). You may add them to the actual label (which would be left aligned). So when this undocking is important for your piece of mind, I'd get in touch with Infragistics tech support (directly or through PSC) and see if they are willing and able to get this fixed.
Continue reading...
Continue reading...