本文整理汇总了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;
}
}
}
示例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));
}
示例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();
}
示例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;
}
}