แก้ไข

แชร์ผ่าน


TreeView.OnBeforeExpand(TreeViewCancelEventArgs) Method

Definition

Raises the BeforeExpand event.

protected:
 virtual void OnBeforeExpand(System::Windows::Forms::TreeViewCancelEventArgs ^ e);
protected virtual void OnBeforeExpand (System.Windows.Forms.TreeViewCancelEventArgs e);
abstract member OnBeforeExpand : System.Windows.Forms.TreeViewCancelEventArgs -> unit
override this.OnBeforeExpand : System.Windows.Forms.TreeViewCancelEventArgs -> unit
Protected Overridable Sub OnBeforeExpand (e As TreeViewCancelEventArgs)

Parameters

e
TreeViewCancelEventArgs

A TreeViewCancelEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnBeforeExpand method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When overriding OnBeforeExpand(TreeViewCancelEventArgs) in a derived class, be sure to call the base class's OnBeforeExpand(TreeViewCancelEventArgs) method so that registered delegates receive the event.

Applies to

See also