当前位置: 首页>>代码示例>>C#>>正文


C# KryptonRibbon.KillKeyboardMode方法代码示例

本文整理汇总了C#中KryptonRibbon.KillKeyboardMode方法的典型用法代码示例。如果您正苦于以下问题:C# KryptonRibbon.KillKeyboardMode方法的具体用法?C# KryptonRibbon.KillKeyboardMode怎么用?C# KryptonRibbon.KillKeyboardMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KryptonRibbon的用法示例。


在下文中一共展示了KryptonRibbon.KillKeyboardMode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: KeyTipSelect

        /// <summary>
        /// Perform actual selection of the item.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon instance.</param>
        public void KeyTipSelect(KryptonRibbon ribbon)
        {
            // Can the numeric up-down take the focus
            if (_domainUpDown.LastDomainUpDown.CanFocus)
            {
                // Prevent the ribbon from killing keyboard mode when it loses the focus,
                // as this causes the tracking windows to be killed and we want them kept
                ribbon.LostFocusLosesKeyboard = false;

                // Prevent the restore of focus when we fill the keyboard mode, as the focus
                // has been placed on the numeric up-down and so focus is allowed to change
                ribbon.IgnoreRestoreFocus = true;

                // Exit the use of keyboard mode
                ribbon.KillKeyboardMode();

                // Push focus to the specified target control
                _domainUpDown.LastDomainUpDown.DomainUpDown.Focus();

                // If the numeric up-down is inside a popup window
                if (_domainUpDown.LastParentControl is VisualPopupGroup)
                {
                    // Ensure that the previous ribbon focus is restored when the popup window is dismissed
                    VisualPopupGroup popupGroup = (VisualPopupGroup)_domainUpDown.LastParentControl;
                    popupGroup.RestorePreviousFocus = true;
                }
            }
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:32,代码来源:DomainUpDownController.cs

示例2: KeyTipSelect

        /// <summary>
        /// Perform actual selection of the item.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon instance.</param>
        public void KeyTipSelect(KryptonRibbon ribbon)
        {
            // Exit keyboard mode when you click the button spec
            ribbon.KillKeyboardMode();

            OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:11,代码来源:GroupCheckBoxController.cs

示例3: KeyTipSelect

        /// <summary>
        /// Perform actual selection of the item.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon instance.</param>
        public void KeyTipSelect(KryptonRibbon ribbon)
        {
            // Prevent the ribbon from killing keyboard mode when it loses the focus,
            // as this causes the tracking windows to be killed and we want them kept
            ribbon.LostFocusLosesKeyboard = false;

            // Get the target to show the drop down menu for the gallery
            _target.KeyTipSelect();

            // Exit the use of keyboard mode
            ribbon.KillKeyboardMode();
        }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:16,代码来源:GalleryController.cs

示例4: KeyTipSelect

        /// <summary>
        /// Perform actual selection of the item.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon instance.</param>
        public void KeyTipSelect(KryptonRibbon ribbon)
        {
            // Generate appropriate event
            switch (_buttonType)
            {
                case GroupButtonType.Push:
                case GroupButtonType.Check:
                    // Exit keyboard mode when you click the button spec
                    ribbon.KillKeyboardMode();

                    OnClick(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                    break;
                case GroupButtonType.DropDown:
                case GroupButtonType.Split:
                    // Exit the use of keyboard mode
                    ribbon.KillKeyboardMode();

                    // Pretend we have captured input and then fix state as pressed
                    _captured = true;
                    _fixedPressed = true;

                    // Redraw to show the fixed state
                    UpdateTargetState(Point.Empty);

                    OnDropDown(new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
                    break;
            }
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:32,代码来源:GroupButtonController.cs


注:本文中的KryptonRibbon.KillKeyboardMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。