Поделиться через


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
Public property AltKey Gets the state of the ALT key when the event was raised.
Public property CharacterCode Gets the integer Unicode value of a key that was pressed.
Public property ClientX Gets the x-coordinate mouse position in pixels relative to the client area of the window.
Public property ClientY Gets the y-coordinate mouse position in pixels relative to the client area of the window.
Public property CtrlKey Gets the state of the CTRL key when the event was raised.
Public property EventObject Gets the underlying HTML event object.
Public property EventType Gets the name of the event raised by the browser.
Public property KeyCode Gets the integer Unicode value of a key that is associated with a keyboard event other than "keypress".
Public property MouseButton Gets the mouse buttons that were clicked at the time the event was raised.
Public property OffsetX Gets the x-coordinate mouse position in pixels relative to the HTML object that raised the event.
Public property OffsetY Gets the y-coordinate mouse position in pixels relative to the HTML object that raised the event.
Public property ScreenX Gets the x-coordinate mouse position in pixels relative to the user's screen.
Public property ScreenY Gets the y-coordinate mouse position in pixels relative to the user's screen.
Public property ShiftKey Gets the state of the SHIFT key when the event was raised.
Public property Source Gets a reference to the Document Object Model (DOM) element or object that raised the event.

Top

Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method 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.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method PreventDefault Specifies that the associated Document Object Model (DOM) element should not perform the default action for the current event.
Public method StopPropagation Specifies that the event should not bubble up the Document Object Model (DOM) hierarchy.
Public method 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.