Uredi

Deli z drugimi prek


TreeView.OnBeforeCollapse(TreeViewCancelEventArgs) Method

Definition

Raises the BeforeCollapse event.

protected:
 virtual void OnBeforeCollapse(System::Windows::Forms::TreeViewCancelEventArgs ^ e);
protected public:
 virtual void OnBeforeCollapse(System::Windows::Forms::TreeViewCancelEventArgs ^ e);
protected virtual void OnBeforeCollapse (System.Windows.Forms.TreeViewCancelEventArgs e);
protected internal virtual void OnBeforeCollapse (System.Windows.Forms.TreeViewCancelEventArgs e);
abstract member OnBeforeCollapse : System.Windows.Forms.TreeViewCancelEventArgs -> unit
override this.OnBeforeCollapse : System.Windows.Forms.TreeViewCancelEventArgs -> unit
Protected Overridable Sub OnBeforeCollapse (e As TreeViewCancelEventArgs)
Protected Friend Overridable Sub OnBeforeCollapse (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 OnBeforeCollapse 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 OnBeforeCollapse(TreeViewCancelEventArgs) in a derived class, be sure to call the base class's OnBeforeCollapse(TreeViewCancelEventArgs) method so that registered delegates receive the event.

Applies to

See also