X Property
Collapse the table of content
Expand the table of content

MouseState.X Property

Specifies the horizontal position of the mouse cursor.
Bb200107.note(en-us,XNAGameStudio.41).gifXbox 360 Specific Information
The value of this property is always 0.

Namespace: Microsoft.Xna.Framework.Input
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public int X { get; }

Property Value

Horizontal position of the mouse cursor in relation to the upper-left corner of the game window.

If the mouse is to the left of the client area (the inside portion of the game window, excluding the borders), the returned coordinate is negative. If the mouse is to the right of the client area, the returned coordinate is greater than the window's client area width.

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone

Community Additions

© 2016 Microsoft