コード例 #1
0
 internal static bool IsRegisteredCommandFocusElement(DependencyObject element)
 {
     if (!(element is Menu) && !(element is ContextMenu) && !(element is ToolBar))
     {
         return((uint)CommandBarNavigationHelper.GetCommandFocusMode(element) > 0U);
     }
     return(true);
 }
コード例 #2
0
 private bool RestoreKeyboardFocus()
 {
     if (CommandBarNavigationHelper.GetCommandFocusMode(this) == CommandBarNavigationHelper.CommandFocusMode.None)
     {
         return(false);
     }
     Keyboard.Focus(null);
     return(true);
 }
コード例 #3
0
 internal static bool IsAttachedCommandFocusElement(DependencyObject element)
 {
     return(CommandBarNavigationHelper.GetCommandFocusMode(element) ==
            CommandBarNavigationHelper.CommandFocusMode.Attached);
 }