'Declaration Public Event DataCursorChange As EventHandler
'Usage Dim instance As DataCursorTool Dim handler As EventHandler AddHandler instance.DataCursorChange, handler
public event EventHandler DataCursorChange
'Declaration Public Event DataCursorChange As EventHandler
'Usage Dim instance As DataCursorTool Dim handler As EventHandler AddHandler instance.DataCursorChange, handler
public event EventHandler DataCursorChange
Dim dataCursorTool As DataCursorTool = New DataCursorTool() AddHandler dataCursorTool.DataCursorChange, AddressOf OnDataCursorChange dataCursorTool.DataCursorMode = DataCursorMode.MouseMove ChartControl.InteractivityOperations.Add(dataCursorTool) Private Sub OnDataCursorChange(ByVal sender As Object, 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
DataCursorTool dataCursorTool = new DataCursorTool(); dataCursorTool.DataCursorChange += new EventHandler(OnDataCursorChange); dataCursorTool.DataCursorMode = DataCursorMode.MouseMove; ChartControl.InteractivityOperations.Add(dataCursorTool); private void OnDataCursorChange(object sender, EventArgs eventargs) { DataCusorToolEventArgs dcea = (DataCusorToolEventArgs)eventargs; XAxisTextBox.Text = dcea.HorizontalAxisValue.ToString("0.00"); YAxisTextBox.Text = dcea.VerticalAxisValue.ToString("0.00"); }
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