MouseDownPoint

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Common > Charts > ChartControl >

MouseDownPoint

Previous page Return to chapter overview Next page

Definition

Indicates the WPF x- and y-coordinates of the mouse cursor at the most recent OnMouseDown() event.

 

Property Value

A Point object containing x- and y-coordinates of the mouse cursor when the left mouse button is clicked or held

 

Syntax

<ChartControl>.MouseDownPoint

 

Examples

ns


protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
  Point cursorPoint = chartControl.MouseDownPoint;
 
  // Print the x- and y-coordinates of the mouse cursor when clicked
  Print(String.Format("Mouse clicked at coordinates {0},{1}", cursorPoint.X, cursorPoint.Y));
}