StylusPoint.X Property

Gets or sets the value for the x-coordinate of the StylusPoint.

Namespace:  System.Windows.Input
Assembly:  System.Windows (in System.Windows.dll)

public double X { get; set; }
<StylusPoint X="double"/>

Property Value

Type: System.Double
The x-coordinate of the StylusPoint in a pixel grid. The default is 0.


X is set a value that evaluates to infinity or a value that is not a number.

The following code example demonstrates how to get the member X property. This is part of a larger example available in StylusPoint class overview.

//StylusPoint objects are collected from the MouseEventArgs and added to MyStroke
private void MyIP_MouseMove(object sender, MouseEventArgs e)
    if (MyStroke != null)
        XTB.Text = "" + e.StylusDevice.GetStylusPoints(MyIP)[0].X;
        YTB.Text = "" + e.StylusDevice.GetStylusPoints(MyIP)[0].Y;
        PressureTB.Text = "" + e.StylusDevice.GetStylusPoints(MyIP)[0].PressureFactor;


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions