Exemple #1
0
        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;
            }
        }
Exemple #2
0
        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);
            }
        }