Class HTMLEventsCollection
Implementation of events collection.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.HTMLUI
Assembly: Syncfusion.HTMLUI.Windows.dll
Syntax
public class HTMLEventsCollection : EventBaseCollection, IList, IHTMLEventsCollection, IHTMLCollection, ICollection, IEnumerable
Constructors
HTMLEventsCollection(IHTMLElement)
Initializes a new instance of the HTMLEventsCollection class
Declaration
public HTMLEventsCollection(IHTMLElement parent)
Parameters
Type | Name | Description |
---|---|---|
IHTMLElement | parent | Element which is the parent of the collection. |
Properties
Item[String]
Returns the event with the specified name. If event is not supported by the element, then it will return NULL.
Declaration
public IHTMLEvent this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A string variable |
Property Value
Type |
---|
IHTMLEvent |
Parent
Gets or sets the parent element of the collection.
Declaration
public IHTMLElement Parent { get; set; }
Property Value
Type |
---|
IHTMLElement |
Methods
AttachEvent(String, EventHandler)
Overloaded. Attaches user delegate to the specified event. If event does not exist in the collection and the element supports such an event, then it will create a new instance of the event class to which the delegate will be attached.
Declaration
public void AttachEvent(string name, EventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Event name. |
System.EventHandler | handler | Delegate to attach. |
AttachEvent(String, EventHandler[])
Attaches user delegate to the specified event. If event does not exist in the collection and the element supports such an event, then it will create a new instance of the event class to which the delegate will be attached.
Declaration
public void AttachEvent(string name, EventHandler[] handlers)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Event name. |
System.EventHandler[] | handlers | Array of the delegates. |
Contains(String)
Indicates whether event with the specified name is supported.
Declaration
public bool Contains(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the event. |
Returns
Type | Description |
---|---|
System.Boolean | True if such an event is supported. |
CopyTo(IHTMLEventsCollection[], Int32)
Overridden. Copies to the specified array.
Declaration
public void CopyTo(IHTMLEventsCollection[] array, int index)
Parameters
Type | Name | Description |
---|---|---|
IHTMLEventsCollection[] | array | Destination array of events. |
System.Int32 | index | Start index. |
DetachEvent(String, EventHandler)
Overloaded. Detaches delegate of the specified event.
Declaration
public void DetachEvent(string name, EventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Event name. |
System.EventHandler | handler | Delegate to detach. |
DetachEvent(String, EventHandler[])
Detaches delegates of the specified event.
Declaration
public void DetachEvent(string name, EventHandler[] handlers)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Event name. |
System.EventHandler[] | handlers | Array of delegates. |
OnParentChanged(ValueChangedEventArgs)
Method called by parent property set part. This is the best place to write any logic dependent on the parent property.
Declaration
protected virtual void OnParentChanged(ValueChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventArgs | args | A ValueChangedEventArgs instance |
RaiseParentChanged(ValueChangedEventArgs)
Method raises the ParentChanged event.
Declaration
protected void RaiseParentChanged(ValueChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventArgs | args | A ValueChangedEventArgs instance |
Events
ParentChanged
Utility event. Raised when parent property changes.
Declaration
public event ValueChangedEventHandler ParentChanged
Event Type
Type |
---|
ValueChangedEventHandler |