'宣言 Public ReadOnly Property KeyActionMappings As UltraExplorerBarKeyActionMappingsCollection
public UltraExplorerBarKeyActionMappingsCollection KeyActionMappings {get;}
このプロパティを使用すると、ユーザーのキーボード入力を処理するための UltraExplorerBar のメカニズムにアクセスできます。選択、移動、編集などのアクションに使用されるキーストロークはすべてテーブルベースのシステムに保存されており、このプロパティを使用して確認したり変更したりできます。KeyActionsMappings プロパティを通じて、アプリケーションの UltraExplorerBar コントロールのキーボード動作をカスタマイズできます。
たとえば、[F8]キーを押したときに UltraExplorerBarGroup の間を移動できるようにしたい場合は、この動作を追加できます。アクションに関連付けるキーコードと特殊修飾キーを指定できるほか、特定のコンテキストでキーマッピングが適用されるかどうかを決定できます。
次の表は、UltraExplorerBar コントロールのデフォルトのキーマッピングをリストしたものです。
KeyCode | ActionCode | StateRequired | StateDisallowed | SpecialKeysRequired | SpecialKeysDisallowed |
---|---|---|---|---|---|
Up | ActivatePreviousGroupOrItem | ActiveGroupOrItemExists | InEditMode, VisualStudio2005ToolboxMode | ||
Up | ActivateAndCheckPreviousGroupOrItem | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | InEditMode | Ctrl | |
Up | ActivateAndCheckLastItemInPreviousGroup | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | InEditMode | Ctrl | |
Up | ActivatePreviousGroup | OutlookNavigationPaneMode, QuickCustomizeButtonActive | InEditMode | ||
Down | ActivateNextGroupOrItem | ActiveGroupOrItemExists | InEditMode, VisualStudio2005ToolboxMode | ||
Down | ActivateAndCheckNextGroupOrItem | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | InEditMode | Ctrl | |
Down | ActivateAndCheckFirstItemInNextGroup | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | InEditMode | Ctrl | |
Down | ActivateQuickCustomizeButton | ActiveGroupExists, OutlookNavigationPaneMode, ActiveGroupIsLastActivateableGroup | InEditMode | ||
Down | DoNothing | OutlookNavigationPaneMode, QuickCustomizeButtonActive | InEditMode | ||
Prior | ScrollPageUp | ActiveItemExists, ListbarMode, ActiveItemIsFirstCurrentlyVisibleItemInGroup | InEditMode | ||
Prior | ScrollPageUp | ActiveGroupOrItemExists, ExplorerBarMode, ActiveGroupOrItemIsFirstCurrentlyVisibleGroupOrItem | InEditMode | ||
Prior | ScrollPageUpThenActivateAndCheckFirstVisibleGroupOrItem | ActiveGroupOrItemExists, ActiveGroupOrItemIsFirstCurrentlyVisibleGroupOrItem, VisualStudio2005ToolboxMode | InEditMode | ||
Prior | ActivateAndCheckFirstCurrentlyVisibleGroupOrItem | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | InEditMode, ActiveGroupOrItemIsFirstCurrentlyVisibleGroupOrItem | ||
Prior | ActivateFirstCurrentlyVisibleItem | ActiveItemExists, ListbarMode, OutlookNavigationPaneMode | InEditMode | ||
Prior | ActivateFirstCurrentlyVisibleGroupOrItem | ActiveGroupOrItemExists, ExplorerBarMode | InEditMode, ActiveGroupOrItemIsFirstCurrentlyVisibleGroupOrItem | ||
Next | ScrollPageDown | ActiveItemExists, ListbarMode, ActiveItemIsLastCurrentlyVisibleItemInGroup | InEditMode | ||
Next | ScrollPageDown | ActiveGroupOrItemExists, ExplorerBarMode, ActiveGroupOrItemIsLastCurrentlyVisibleGroupOrItem | InEditMode | ||
Next | ScrollPageDownThenActivateAndCheckLastVisibleGroupOrItem | ActiveGroupOrItemExists, ActiveGroupOrItemIsLastCurrentlyVisibleGroupOrItem, VisualStudio2005ToolboxMode | InEditMode | ||
Next | ActivateLastCurrentlyVisibleItem | ActiveItemExists | InEditMode, VisualStudio2005ToolboxMode | ||
Next | ActivateLastCurrentlyVisibleGroupOrItem | ActiveGroupOrItemExists, ExplorerBarMode | InEditMode, ActiveGroupOrItemIsLastCurrentlyVisibleGroupOrItem | ||
Next | ActivateAndCheckLastCurrentlyVisibleGroupOrItem | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | InEditMode, ActiveGroupOrItemIsLastCurrentlyVisibleGroupOrItem | ||
Enter | ClickActiveGroup | ActiveGroupExists, ListbarMode | InEditMode, ActiveGroupIsSelected | ||
Enter | ClickActiveGroup | ActiveGroupExists, OutlookNavigationPaneMode | InEditMode, ActiveGroupIsSelected | ||
Enter | ClickActiveGroup | ActiveGroupExists, ExplorerBarMode | InEditMode | ||
Enter | ClickActiveGroup | ActiveGroupExists, VisualStudio2005ToolboxMode | InEditMode | ||
Enter | ClickActiveItem | ActiveItemExists | InEditMode | ||
Space | ClickActiveItem | ActiveItemExists | InEditMode | ||
Enter | ExitEditMode | InEditMode | |||
Enter | DisplayQuickCustomizeMenu | OutlookNavigationPaneMode, QuickCustomizeButtonActive | InEditMode | ||
Space | ClickActiveGroup | ActiveGroupExists, ListbarMode | InEditMode, ActiveGroupIsSelected | ||
Space | ClickActiveGroup | ActiveGroupExists, OutlookNavigationPaneMode | InEditMode, ActiveGroupIsSelected | ||
Space | ClickActiveGroup | ActiveGroupExists, ExplorerBarMode | InEditMode | ||
Space | DisplayQuickCustomizeMenu | OutlookNavigationPaneMode, QuickCustomizeButtonActive | InEditMode | ||
Esc | ExitEditMode | InEditMode | |||
Home | ActivateFirstGroup | ActiveGroupExists | InEditMode, VisualStudio2005ToolboxMode | ||
Home | ActivateFirstGroup | InEditMode, VisualStudio2005ToolboxMode | Shift | ||
Home | ActivateFirstItemInSameGroup | ActiveItemExists | ActiveItemIsFirstItemInGroup, InEditMode, VisualStudio2005ToolboxMode | ||
Home | ActivateAndCheckFirstItemInSameGroup | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | ActiveItemIsFirstItemInGroup, InEditMode | Ctrl | |
Home | ActivateAndCheckFirstGroup | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | InEditMode | Ctrl | |
Home | ActivateGroupContainingActiveItem | ActiveItemExists, ActiveItemIsFirstItemInGroup | InEditMode, VisualStudio2005ToolboxMode | ||
Tab | ActivateFirstGroupOrItem | ActivateableGroupOrItemExists | ActiveGroupOrItemExists, InEditMode, VisualStudio2005ToolboxMode | Shift | |
Tab | TabNextFromActiveGroupOrItem | CanTabNextFromActiveGroupOrItem | InEditMode, VisualStudio2005ToolboxMode | Shift | |
Tab | TabPreviousFromActiveGroupOrItem | CanTabPreviousFromActiveGroupOrItem | InEditMode, VisualStudio2005ToolboxMode | Shift | |
Tab | ActivateLastGroupOrItem | ActivateableGroupOrItemExists | ActiveGroupOrItemExists, InEditMode, VisualStudio2005ToolboxMode | Shift | |
Tab | ActivateAndCheckNextGroupOrItem | ActiveItemExists, VisualStudio2005ToolboxMode | ActiveItemIsLastItemInGroup, InEditMode | Shift | |
Tab | ActivateAndCheckFirstItemInSameGroup | ActiveItemExists, ActiveItemIsLastItemInGroup, VisualStudio2005ToolboxMode | InEditMode | Shift | |
Tab | ActivateAndCheckFirstItemInSameGroup | ActiveGroupExists, VisualStudio2005ToolboxMode | InEditMode | Shift | |
Tab | ActivateAndCheckPreviousGroupOrItem | ActiveItemExists, VisualStudio2005ToolboxMode | ActiveItemIsFirstItemInGroup, InEditMode | Shift | |
Tab | ActivateAndCheckLastItemInSameGroup | ActiveItemExists, ActiveItemIsFirstItemInGroup, VisualStudio2005ToolboxMode | InEditMode | Shift | |
Tab | ActivateAndCheckLastItemInSameGroup | ActiveGroupExists, VisualStudio2005ToolboxMode | InEditMode | Shift | |
End | ActivateLastGroup | ActiveItemIsLastItemInGroup, ListbarMode | InEditMode, LastGroupIsSelected | ||
End | ActivateLastItemInLastGroup | ActiveItemExists, ActiveItemIsLastItemInGroup, ExplorerBarMode | InEditMode | Shift | |
End | ActivateLastItemInLastGroup | ExplorerBarMode | InEditMode | Shift | |
End | ActivateLastItemInLastGroup | ActiveGroupExists, ExplorerBarMode | ActiveGroupExpanded, InEditMode | ||
End | ActivateLastItemInLastGroup | ListbarMode, LastGroupIsSelected | InEditMode | ||
End | ActivateLastItemInSameGroup | ActiveGroupOrItemExists | ActiveItemIsLastItemInGroup, InEditMode, VisualStudio2005ToolboxMode | Shift | |
End | ActivateAndCheckLastItemInSameGroup | ActiveGroupOrItemExists, VisualStudio2005ToolboxMode | ActiveItemIsLastItemInGroup, InEditMode | Ctrl | |
End | ActivateAndCheckLastGroup | ActivateableGroupOrItemExists, VisualStudio2005ToolboxMode | InEditMode, LastGroupIsSelected | Ctrl | |
F2 | EditActiveGroup | ActiveGroupExists, ActiveGroupOrItemIsEditable | |||
F2 | EditActiveItem | ActiveItemExists, ActiveGroupOrItemIsEditable | |||
右 | ActivateNextGroup | ActiveGroupExists, ExplorerBarMode, IsMultiColumn | ActiveGroupIsLastGroup, InEditMode | ||
右 | ActivateNextGroup | ActiveItemExists, ExplorerBarMode, IsMultiColumn | ActiveItemIsInLastGroup, GroupFollowingActiveItemGroupExpanded, InEditMode | ||
右 | ActivateNextGroup | ActiveGroupExists, OutlookNavigationPaneMode | InEditMode, ActiveGroupIsLastActivateableGroup | ||
右 | ActivateFirstItemInNextGroup | ActiveItemExists, GroupFollowingActiveItemGroupExpanded, ExplorerBarMode, IsMultiColumn | ActiveItemIsInLastGroup, InEditMode | ||
右 | ActivateQuickCustomizeButton | ActiveGroupExists, OutlookNavigationPaneMode, ActiveGroupIsLastActivateableGroup | InEditMode | ||
右 | DisplayQuickCustomizeMenu | OutlookNavigationPaneMode, QuickCustomizeButtonActive | InEditMode | ||
右 | ClickActiveGroup | ActiveGroupExists, VisualStudio2005ToolboxMode | ActiveGroupExpanded, InEditMode | ||
左 | ActivatePreviousGroup | ActiveGroupExists, ExplorerBarMode, IsMultiColumn | ActiveGroupIsFirstGroup, InEditMode | ||
左 | ActivatePreviousGroup | ActiveItemExists, ExplorerBarMode, IsMultiColumn | ActiveItemIsInFirstGroup, GroupPreceedingActiveItemGroupExpanded, InEditMode | ||
左 | ActivatePreviousGroup | ActiveGroupExists, OutlookNavigationPaneMode | InEditMode | ||
左 | ActivatePreviousGroup | OutlookNavigationPaneMode, QuickCustomizeButtonActive | InEditMode | ||
左 | ActivateFirstItemInPreviousGroup | ActiveItemExists, GroupPreceedingActiveItemGroupExpanded, ExplorerBarMode, IsMultiColumn | ActiveItemIsInFirstGroup, InEditMode | ||
左 | ClickActiveGroup | ActiveGroupExists, ActiveGroupExpanded, VisualStudio2005ToolboxMode | InEditMode |
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinExplorerBar Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button10.Click ' Add a key action mapping that will activate the first group in the control when the ' F3 key is pressed, but only when the control style is ExplorerBar and the control is ' not currently editing a Group or Item name. Dim myKeyActionMapping As UltraExplorerBarKeyActionMapping = _ New UltraExplorerBarKeyActionMapping(Keys.F3, _ UltraExplorerBarAction.ActivateFirstGroup, _ UltraExplorerBarStates.ActiveGroupIsFirstGroup Or UltraExplorerBarStates.InEditMode, _ UltraExplorerBarStates.ExplorerBarMode, _ 0, _ 0) Me.ultraExplorerBar1.KeyActionMappings.Add(myKeyActionMapping) ' Find the any keyaction mappings that invoke the ActivateLastGroup action and add disallowed ' and required states. Dim keyActionMapping As UltraExplorerBarKeyActionMapping For Each keyActionMapping In Me.ultraExplorerBar1.KeyActionMappings If (keyActionMapping.ActionCode = UltraExplorerBarAction.ActivateLastGroup) Then keyActionMapping.StateDisallowed = keyActionMapping.StateDisallowed Or UltraExplorerBarStates.ListbarMode keyActionMapping.StateRequired = keyActionMapping.StateRequired Or UltraExplorerBarStates.ActiveItemIsFirstItemInGroup End If Next End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinExplorerBar; private void button10_Click(object sender, System.EventArgs e) { // Add a key action mapping that will activate the first group in the control when the // F3 key is pressed, but only when the control style is ExplorerBar and the control is // not currently editing a Group or Item name. UltraExplorerBarKeyActionMapping myKeyActionMapping = new UltraExplorerBarKeyActionMapping(Keys.F3, UltraExplorerBarAction.ActivateFirstGroup, UltraExplorerBarStates.ActiveGroupIsFirstGroup | UltraExplorerBarStates.InEditMode, UltraExplorerBarStates.ExplorerBarMode, 0, 0); this.ultraExplorerBar1.KeyActionMappings.Add(myKeyActionMapping); // Find the any keyaction mappings that invoke the ActivateLastGroup action and add disallowed // and required states. foreach(UltraExplorerBarKeyActionMapping keyActionMapping in this.ultraExplorerBar1.KeyActionMappings) { if (keyActionMapping.ActionCode == UltraExplorerBarAction.ActivateLastGroup) { keyActionMapping.StateDisallowed |= UltraExplorerBarStates.ListbarMode; keyActionMapping.StateRequired |= UltraExplorerBarStates.ActiveItemIsFirstItemInGroup; } } }