| Visual Basic (Declaration) | |
|---|---|
Public Event BeforeCheck() As BeforeCheckEventHandler | |
| C# | |
|---|---|
public event BeforeCheckEventHandler BeforeCheck() | |
The CancelableNodeEventArgs.TreeNode property of the CancelableNodeEventArgs contains a reference to UltraTreeNode whose UltraTreeNode.CheckedState is about to change.
Setting the Cancel property to true will prevent the UltraTreeNode.CheckedState of the UltraTreeNode from changing.
The BeforeCheckEventArgs.NewValue parameter gets/sets the new value of the UltraTreeNode.CheckedState property of the UltraTreeNode.
This event applies only to nodes whose Override.NodeStyle is set to CheckBox, CheckBoxTripleState, or OptionButton.
The following sample code illustrates some of the information available in the BeforeCheck event.
For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.
For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.
| Visual Basic | Copy Code |
|---|---|
Imports Infragistics.Win.UltraWinTree | |
| C# | Copy Code |
|---|---|
using System.Diagnostics; | |
