38 references to TreeViewAction
System.Windows.Forms (26)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (3)
350bool eventReturn = tv.TreeViewBeforeCheck(this, TreeViewAction.Unknown); 354tv.TreeViewAfterCheck(this, TreeViewAction.Unknown); 1472TreeViewCancelEventArgs e = new(this, false, TreeViewAction.Collapse);
System\Windows\Forms\Controls\TreeView\TreeView.cs (18)
1653internal bool TreeViewBeforeCheck(TreeNode? node, TreeViewAction actionTaken) 1660internal void TreeViewAfterCheck(TreeNode node, TreeViewAction actionTaken) 2262bool eventReturn = TreeViewBeforeCheck(node, TreeViewAction.ByKeyboard); 2266TreeViewAfterCheck(node, TreeViewAction.ByKeyboard); 2445e = new TreeViewCancelEventArgs(NodeFromHandle(item.hItem), false, TreeViewAction.Expand); 2450e = new TreeViewCancelEventArgs(NodeFromHandle(item.hItem), false, TreeViewAction.Collapse); 2473e = new TreeViewEventArgs(node, TreeViewAction.Collapse); 2478e = new TreeViewEventArgs(node, TreeViewAction.Expand); 2498TreeViewAction action = TreeViewAction.Unknown; 2502action = TreeViewAction.ByKeyboard; 2506action = TreeViewAction.ByMouse; 2527TreeViewAction action = TreeViewAction.Unknown; 2531action = TreeViewAction.ByKeyboard; 2535action = TreeViewAction.ByMouse; 3286bool eventReturn = TreeViewBeforeCheck(node, TreeViewAction.ByMouse); 3290TreeViewAfterCheck(node, TreeViewAction.ByMouse);
System\Windows\Forms\Controls\TreeView\TreeViewCancelEventArgs.cs (2)
16public TreeViewCancelEventArgs(TreeNode? node, bool cancel, TreeViewAction action) 25public TreeViewAction Action { get; }
System\Windows\Forms\Controls\TreeView\TreeViewEventArgs.cs (3)
17Action = TreeViewAction.Unknown; 20public TreeViewEventArgs(TreeNode? node, TreeViewAction action) 31public TreeViewAction Action { get; }
System.Windows.Forms.Tests (12)
System\Windows\Forms\TreeViewCancelEventArgsTests.cs (3)
11yield return new object[] { null, false, TreeViewAction.Unknown - 1 }; 12yield return new object[] { new TreeNode(), true, TreeViewAction.ByKeyboard }; 17public void Ctor_TreeNode_Bool_TreeViewAction(TreeNode node, bool cancel, TreeViewAction action)
System\Windows\Forms\TreeViewEventArgsTests.cs (4)
21Assert.Equal(TreeViewAction.Unknown, e.Action); 26yield return new object[] { null, TreeViewAction.Unknown - 1 }; 27yield return new object[] { new TreeNode(), TreeViewAction.ByKeyboard }; 32public void Ctor_TreeNode_TreeViewAction(TreeNode node, TreeViewAction action)
System\Windows\Forms\TreeViewTests.cs (5)
5419yield return new object[] { new TreeViewEventArgs(new TreeNode(), TreeViewAction.ByMouse) }; 5562yield return new object[] { new TreeViewCancelEventArgs(null, false, TreeViewAction.ByKeyboard) }; 5563yield return new object[] { new TreeViewCancelEventArgs(new TreeNode(), true, TreeViewAction.ByKeyboard) }; 5798Assert.Equal(TreeViewAction.ByKeyboard, e.Action); 5807Assert.Equal(TreeViewAction.ByKeyboard, e.Action);