Exemplo n.º 1
0
        protected override void OnToggleGrid()
        {
            if (_plot.Gridlines)
            {
                _plot.Gridlines      = false;
                _plot.MinorGridlines = false;
            }
            else
            {
                _plot.Gridlines      = true;
                _plot.MinorGridlines = true;
            }

            _plot.UpdateLayout();
        }
Exemplo n.º 2
0
        public PlotSettingsViewModel(XYPlotValue value)
        {
            _value           = value;
            Title            = value.Title;
            IsLegendVisible  = value.ShowLegend;
            LegendBackground = value.LegendBackground.BrushFromString();
            LegendBorder     = value.LegendLineColor.BrushFromString();
            Position         = value.LegendPosition;
            _save            = new RelayCommand(x =>
            {
                var window              = x as PlotSettingsWindow;
                _value.Title            = _title;
                _value.LegendPosition   = _position;
                _value.ShowLegend       = _isLegendVisible;
                _value.LegendLineColor  = _legendBorder.ToHtml();
                _value.LegendBackground = _legendBackground.ToHtml();
                _value.UpdateLayout();

                if (window != null)
                {
                    window.Close();
                }
            });
        }