Exemple #1
0
        protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
        {
            if (e.OriginalSource == this)
            {
                RibbonTab tab = RibbonTab;
                if (tab != null)
                {
                    // Select the tab and make it next keytip scope.
                    tab.IsSelected = true;
                    if (KeyTipService.GetIsKeyTipScope(tab))
                    {
                        e.TargetKeyTipScope = tab;
                    }
                }
                // Focus self.
                this.Focus();
                Ribbon ribbon = Ribbon;
                if (ribbon != null)
                {
                    if (ribbon.IsMinimized && !ribbon.IsDropDownOpen)
                    {
                        // Open dropdown of ribbon.
                        ribbon.IsDropDownOpen = true;
                    }
                }

                e.Handled = true;
            }
        }
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         OnClick();
         e.Handled = true;
     }
 }
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         SetSelectedOnInput();
         e.Handled = true;
     }
 }
Exemple #4
0
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         // Open Group DropDown and focus self.
         RibbonHelper.OpenParentRibbonGroupDropDownSync(this, TemplateApplied);
         Focus();
         e.Handled = true;
     }
 }
Exemple #5
0
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource != this)
     {
         return;
     }
     Activate();
     if (MenuRibbon != null)
     {
         e.TargetKeyTipScope = MenuRibbon.KeyTipScope;
     }
 }
 protected override void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         if (CanOpenSubMenu)
         {
             FocusOrSelect();
             IsSubmenuOpen = true;
             RibbonHelper.NavigateToNextMenuItemOrGallery(this, -1, BringIndexIntoView);
             UIElement popupChild = Popup.TryGetChild();
             if (popupChild != null)
             {
                 KeyTipService.SetIsKeyTipScope(popupChild, true);
                 e.TargetKeyTipScope = popupChild;
             }
         }
         e.Handled = true;
     }
 }
 protected virtual void OnPreviewKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == _overflowButton)
     {
         // Handle KeyTip accessed for overflow button.
         if (HasOverflowItems &&
             !IsOverflowOpen)
         {
             IsOverflowOpen = true;
             UIElement popupChild = _overflowPopup.TryGetChild();
             if (popupChild != null)
             {
                 KeyTipService.SetIsKeyTipScope(popupChild, true);
                 e.TargetKeyTipScope = popupChild;
             }
         }
         e.Handled = true;
     }
 }
Exemple #8
0
        protected override void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
        {
            if (e.OriginalSource != this)
            {
                return;
            }

            if (HasItems)
            {
                this.OnNavigateChildren();
                e.TargetKeyTipScope = this;
            }
            else
            {
                OnClick();
            }

            e.Handled = true;
            if (!IsOpen)
            {
                this.CloseAllPopups();
            }
        }
 private static void OnPreviewKeyTipAccessedThunk(object sender, KeyTipAccessedEventArgs e)
 {
     ((RibbonQuickAccessToolBar)sender).OnPreviewKeyTipAccessed(e);
 }
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         OnClick();
         e.Handled = true;
     }
 }
 private static void OnKeyTipAccessedThunk(object sender, KeyTipAccessedEventArgs e)
 {
     ((RibbonGalleryItem)sender).OnKeyTipAccessed(e);
 }
Exemple #12
0
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         // Open Group DropDown and focus self.
         RibbonHelper.OpenParentRibbonGroupDropDownSync(this, TemplateApplied);
         Focus();
         e.Handled = true;
     }
 }
Exemple #13
0
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
 }
		protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
		{
			if (e.OriginalSource != this)
				return;
			Activate();
			if (MenuRibbon != null)
				e.TargetKeyTipScope = MenuRibbon.KeyTipScope;
		}
 private static void OnKeyTipAccessedThunk(object sender, KeyTipAccessedEventArgs e)
 {
     ((RibbonGalleryItem)sender).OnKeyTipAccessed(e);
 }
		protected override void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
		{
			if (e.OriginalSource != this)
				return;

			if (HasItems)
			{
				this.OnNavigateChildren();
				e.TargetKeyTipScope = this;
			}
			else
			{
				OnClick();
			}

			e.Handled = true;
			if (!IsOpen)
			{
				this.CloseAllPopups();
			}
		}
Exemple #17
0
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         if (CanOpenSubMenu)
         {
             FocusOrSelect();
             IsSubmenuOpen = true;
             RibbonHelper.NavigateToNextMenuItemOrGallery(this, -1, BringIndexIntoView);
             UIElement popupChild = _popup.TryGetChild();
             if (popupChild != null)
             {
                 KeyTipService.SetIsKeyTipScope(popupChild, true);
                 e.TargetKeyTipScope = popupChild;
             }
         }
         else
         {
             OnClick();
         }
         e.Handled = true;
     }
 }
 private static void OnKeyTipAccessedThunk(object sender, KeyTipAccessedEventArgs e)
 {
     ((RibbonToggleButton)sender).OnKeyTipAccessed(e);
 }
Exemple #19
0
 private static void OnKeyTipAccessedThunk(object sender, KeyTipAccessedEventArgs e)
 {
     ((RibbonTabHeader)sender).OnKeyTipAccessed(e);
 }
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         // Open the dropdown of parent group and self.
         RibbonHelper.OpenParentRibbonGroupDropDownSync(this, TemplateApplied);
         IsDropDownOpen = true;
         RibbonHelper.NavigateToNextMenuItemOrGallery(this, -1, BringIndexIntoView);
         UIElement popupChild = _popup.TryGetChild();
         if (popupChild != null)
         {
             KeyTipService.SetIsKeyTipScope(popupChild, true);
             e.TargetKeyTipScope = popupChild;
         }
         e.Handled = true;
     }
 }
 private static void OnKeyTipAccessedThunk(object sender, KeyTipAccessedEventArgs e)
 {
     ((RibbonToggleButton)sender).OnKeyTipAccessed(e);
 }
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
     if (e.OriginalSource == this)
     {
         SetSelectedOnInput();
         e.Handled = true;
     }
 }
 protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
 {
 }
 private static void OnKeyTipAccessedThunk(object sender, KeyTipAccessedEventArgs e)
 {
     ((RibbonCheckBox)sender).OnKeyTipAccessed(e);
 }
Exemple #25
0
        protected virtual void OnKeyTipAccessed(KeyTipAccessedEventArgs e)
        {
            if (e.OriginalSource == this)
            {
                RibbonTab tab = RibbonTab;
                if (tab != null)
                {
                    // Select the tab and make it next keytip scope.
                    tab.IsSelected = true;
                    if (KeyTipService.GetIsKeyTipScope(tab))
                    {
                        e.TargetKeyTipScope = tab;
                    }
                }
                // Focus self.
                this.Focus();
                Ribbon ribbon = Ribbon;
                if (ribbon != null)
                {
                    if (ribbon.IsMinimized && !ribbon.IsDropDownOpen)
                    {
                        // Open dropdown of ribbon.
                        ribbon.IsDropDownOpen = true;
                    }
                }

                e.Handled = true;
            }
        }