Код: Выделить всё
private void MyPlotModel_MouseDown(object sender, OxyMouseDownEventArgs ex)
{
OxyPlot.ElementCollection axisList = SpectralPlotModel.Axes;
Axis xAxis = axisList.FirstOrDefault(ax => ax.Position == AxisPosition.Bottom);
Axis yAxis = axisList.FirstOrDefault(ax => ax.Position == AxisPosition.Left);
NearestPoint = OxyPlot.Axes.Axis.InverseTransform(ex.Position, xAxis, yAxis);
Debug.Print("Nearest Point: " + NearestPoint);
}
Код: Выделить всё
public DataPoint NearestPoint
{
get
{
Debug.Print($"Entered Get {_nearestPoint}!!!");
return _nearestPoint;
}
set
{
Debug.Print($"Entered Set {value}!!!");
_nearestPoint = value;
OnPropertyChanged(nameof(NearestPoint));
}
}
Я звоню эта переменная из этой функции:
Код: Выделить всё
public async void OnLockChanged(int scanWindow, int intesityThreshold)
{
Debug.Print($"Points: {NearestPoint}, scanWindowSeconds: {scanWindow},Threshold: {intesityThreshold}");
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... setting-it
Мобильная версия