'Declaration Public Shadows Property StateRequired As UltraTreeState
public new UltraTreeState StateRequired {get; set;}
Imports Infragistics.Win.UltraWinTree Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim newAction As TreeKeyActionMapping ' Add 2 KeyActionMappings so that if the user presses ' the 'X' key (without also pressing the 'Alt' key) ' the active node will toggle its expanded state. ' The first mapping states that if the node is expandable ' and its not already expanded or in edit mode and the ' user presses the 'X' key then expand the node. newAction = New TreeKeyActionMapping( _ Keys.X, _ UltraTreeAction.ExpandNode, _ UltraTreeState.InEdit Or UltraTreeState.NodeExpanded, _ UltraTreeState.NodeExpandable, _ Infragistics.Win.SpecialKeys.Alt, _ 0) Me.ultraTree1.KeyActionMappings.Add(newAction) ' The first mapping states that if the node is expanded ' and its not in edit mode and the user presses the 'X' ' key then collapse the node. newAction = New TreeKeyActionMapping( _ Keys.X, _ UltraTreeAction.CollapseNode, _ UltraTreeState.InEdit, _ UltraTreeState.NodeExpanded, _ Infragistics.Win.SpecialKeys.Alt, _ 0) Me.ultraTree1.KeyActionMappings.Add(newAction) End Sub
using System.Diagnostics; using Infragistics.Win.UltraWinTree; private void Form1_Load(object sender, System.EventArgs e) { // Add 2 KeyActionMappings so that if the user presses // the 'X' key (without also pressing the 'Alt' key) // the active node will toggle its expanded state. // The first mapping states that if the node is expandable // and its not already expanded or in edit mode and the // user presses the 'X' key then expand the node. this.ultraTree1.KeyActionMappings.Add( new TreeKeyActionMapping( // the key code Keys.X, // the action to take UltraTreeAction.ExpandNode, // disallowed state UltraTreeState.InEdit | UltraTreeState.NodeExpanded, // required state UltraTreeState.NodeExpandable, // disallowed special keys Infragistics.Win.SpecialKeys.Alt, // required special keys (none) 0 ) ); // The first mapping states that if the node is expanded // and its not in edit mode and the user presses the 'X' // key then collapse the node. this.ultraTree1.KeyActionMappings.Add( new TreeKeyActionMapping( // the key code Keys.X, // the action to take UltraTreeAction.CollapseNode, // disallowed state UltraTreeState.InEdit, // required state UltraTreeState.NodeExpanded, // disallowed special keys Infragistics.Win.SpecialKeys.Alt, // required special keys (none) 0 ) ); }
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