HtmlEventArgs Class
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Provides event details to event handlers.
Inheritance Hierarchy
System.Object
System.EventArgs
System.Windows.Browser.HtmlEventArgs
Namespace: System.Windows.Browser
Assembly: System.Windows.Browser (in System.Windows.Browser.dll)
Syntax
'Declaration
Public Class HtmlEventArgs _
Inherits EventArgs
public class HtmlEventArgs : EventArgs
The HtmlEventArgs type exposes the following members.
Properties
Name | Description | |
---|---|---|
AltKey | Gets the state of the ALT key when the event was raised. | |
CharacterCode | Gets the integer Unicode value of a key that was pressed. | |
ClientX | Gets the x-coordinate mouse position in pixels relative to the client area of the window. | |
ClientY | Gets the y-coordinate mouse position in pixels relative to the client area of the window. | |
CtrlKey | Gets the state of the CTRL key when the event was raised. | |
EventObject | Gets the underlying HTML event object. | |
EventType | Gets the name of the event raised by the browser. | |
KeyCode | Gets the integer Unicode value of a key that is associated with a keyboard event other than "keypress". | |
MouseButton | Gets the mouse buttons that were clicked at the time the event was raised. | |
OffsetX | Gets the x-coordinate mouse position in pixels relative to the HTML object that raised the event. | |
OffsetY | Gets the y-coordinate mouse position in pixels relative to the HTML object that raised the event. | |
ScreenX | Gets the x-coordinate mouse position in pixels relative to the user's screen. | |
ScreenY | Gets the y-coordinate mouse position in pixels relative to the user's screen. | |
ShiftKey | Gets the state of the SHIFT key when the event was raised. | |
Source | Gets a reference to the Document Object Model (DOM) element or object that raised the event. |
Top
Methods
Name | Description | |
---|---|---|
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
PreventDefault | Specifies that the associated Document Object Model (DOM) element should not perform the default action for the current event. | |
StopPropagation | Specifies that the event should not bubble up the Document Object Model (DOM) hierarchy. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
You typically specify an EventHandler<HtmlEventArgs> when you require the additional event details that are available from HtmlEventArgs. Because of the overhead in fetching this information from the browser, you can instead use an EventHandler object for cases where you do not need the Document Object Model (DOM) information as part of event processing.
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.