protected virtual void PlotModel_MouseDown(object sender, OxyMouseDownEventArgs e) { IDialogServiceExt svc = SimpleIoc.Default.GetInstance <IDialogServiceExt>(); selectedPosition = e.Position; if (e.ChangedButton == OxyMouseButton.Left && e.ClickCount > 1 && PlotModel.TitleArea.Contains(e.Position)) { string response = svc.ShowPromptDialog("Enter new title:", Title); if (response != string.Empty) { Title = response; plotModel.Title = response; } e.Handled = true; } }
protected void ShowRangeDialog(Axis axis) { IDialogServiceExt svc = SimpleIoc.Default.GetInstance <IDialogServiceExt>(); IRangeModel rangeVM = svc.ShowRangeDialog(axis.ActualMinimum, axis.ActualMaximum); if (rangeVM != null) { axis.Reset(); if (rangeVM.Auto) { axis.Minimum = double.NaN; axis.Maximum = double.NaN; } else { axis.Minimum = rangeVM.From; axis.Maximum = rangeVM.To; } this.plotModel.InvalidatePlot(false); } }