'Declaration
Public Event DataCursorChange As EventHandler
'Usage
Dim instance As DataCursorTool
Dim handler As EventHandler
AddHandler instance.DataCursorChange, handler
Remarks
The event args object is of type DataCursorToolEventArgs containing the mouse coordinates expressed in the coordinate system of the selected horizontal and vertical axes.
Example
The following example shows how to track the mouse position in axis coordinates:
Dim dataCursorTool As DataCursorTool = New DataCursorTool()
AddHandler dataCursorTool.DataCursorChange, AddressOf OnDataCursorChange
dataCursorTool.DataCursorMode = DataCursorMode.MouseMove
ChartControl.InteractivityOperations.Add(dataCursorTool)
PrivateSub OnDataCursorChange(ByVal sender AsObject, ByVal eventargs As EventArgs)
Dim dcea As DataCusorToolEventArgs = CType(eventargs, DataCusorToolEventArgs)
XAxisTextBox.Text = dcea.HorizontalAxisValue.ToString("0.00")
YAxisTextBox.Text = dcea.VerticalAxisValue.ToString("0.00")
End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2