Version

ActionCode Property

Gets/sets the action code.
Syntax
'Declaration
 
Public Shadows Property ActionCode As UltraExplorerBarAction
public new UltraExplorerBarAction ActionCode {get; set;}
Example
The following code demonstrates how to create a KeyActionMapping and add it to the control's KeyActionMappings collection.

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;
				}
			}
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also