Class
MouseEvent

Class representing a scriptable mouse event that can be sent to a browser window.

Definition

Namespace:ArtOfTest.WebAii.Javascript

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
[DataContract]
public class MouseEvent : ScriptUIEvent

Inheritance: objectScriptEventScriptUIEventMouseEvent

Inherited Members ScriptUIEvent.ModifierKeysScriptEvent.CanBubbleScriptEvent.IsCancelableScriptEvent.Type

Constructors

MouseEvent()

Initializes a new MouseEvent object.

Declaration

cs-api-definition
public MouseEvent()

MouseEvent(string)

Creates a mouse event of the given type, with other parameters set to default values

Declaration

cs-api-definition
public MouseEvent(string type)

Parameters

type

string

The type of the event

Properties

Button

Gets / Sets the mouse button of this event.

Declaration

cs-api-definition
[DataMember(Name = "button")]
public MouseButton Button { get; set; }

Property Value

MouseButton

RelatedTargetLocator

Gets / Sets the related target control

Declaration

cs-api-definition
[DataMember(Name = "relatedTarget")]
public string RelatedTargetLocator { get; set; }

Property Value

string

ScreenX

Gets / Sets the horizontal position of the cursor for mouse events

Declaration

cs-api-definition
[DataMember(Name = "screenX")]
public int ScreenX { get; set; }

Property Value

int

ScreenY

Gets / Sets the vertical position of the cursor for mouse events

Declaration

cs-api-definition
[DataMember(Name = "screenY")]
public int ScreenY { get; set; }

Property Value

int

Methods

SetRelatedTarget(Element)

Set the related target for this event to an element, with a locator based on the tag name / tag index

Declaration

cs-api-definition
public void SetRelatedTarget(Element e)

Parameters

e

Element

The related target element

SetRelatedTarget(string)

Set the related target for this event to an HtmlControl, using the control's ClientSideLocator.

Declaration

cs-api-definition
public void SetRelatedTarget(string locator)

Parameters

locator

string

The related target control.