// Token: 0x06005E75 RID: 24181 RVA: 0x001A7838 File Offset: 0x001A5A38
        private static void OnPreviewKeyboardInputProviderAcquireFocus(object sender, KeyboardInputProviderAcquireFocusEventArgs e)
        {
            MenuBase menuBase = (MenuBase)sender;

            if (!menuBase.IsKeyboardFocusWithin && !menuBase.HasPushedMenuMode)
            {
                menuBase.PushMenuMode(true);
            }
        }
Example #2
0
        // This method ensures that whenever focus is given to an element
        // within a menu, that the menu enters menu mode.  This can't be
        // done with a simple IsFocusWithin changed handler because we
        // need to actually enter menu mode before focus changes.
        private static void OnPreviewKeyboardInputProviderAcquireFocus(object sender, KeyboardInputProviderAcquireFocusEventArgs e)
        {
            MenuBase menu = (MenuBase)sender;

            // If we haven't already pushed menu mode, we need to do it before
            // focus enters the menu for the first time
            if (!menu.IsKeyboardFocusWithin && !menu.HasPushedMenuMode)
            {
                // Call PushMenuMode just before focus enters the menu...
                menu.PushMenuMode(/*isAcquireFocusMenuMode*/ true);
            }
        }