protected void MouseClicked(object sender, MouseButtonEventArgs e)
{
// convert e.GetPosition for different dpi settings
clickPoint.X = ChartingExtensions.ConvertToHorizontalPixels(e.Get Position(ChartPanel as IInputElement).X, ChartControl.PresentationSource);
clickPoint.Y = ChartingExtensions.ConvertToVerticalPixels(e.GetPo sition(ChartPanel as IInputElement).Y, ChartControl.PresentationSource);
convertedPrice = Instrument.MasterInstrument.RoundToTickSize(chartS cale.GetValueByY((float)clickPoint.Y));
convertedTime = ChartControl.GetTimeBySlotIndex((int)ChartControl. GetSlotIndexByX((int)clickPoint.X));
if (bShowMarkerLine == true)
{
Draw.VerticalLine(this, "VLine", convertedTime, Brushes.Blue);
Draw.HorizontalLine(this, "HLine", convertedPrice, Brushes.Blue);
tSelectedTime = convertedTime;
dSelectedPrice = convertedPrice;
}
}
Comment