public Axes2D(PlotPanel plotPanel) { this.plotPanel = plotPanel; frame = new AxesFrame(); frame.SetValue(Grid.ZIndexProperty, 300); // note that individual axes have index of 200 plotPanel.Children.Add(frame); xAxisBottom = new XAxis(); xAxisBottom.SetValue(XAxis.XAxisPositionProperty, XAxisPosition.Bottom); xAxisTop = new XAxis(); xAxisTop.SetValue(XAxis.XAxisPositionProperty, XAxisPosition.Top); // xAxes = new XAxis2DCollection(plotPanel); xAxes.Add(xAxisBottom); xAxes.Add(xAxisTop); xAxis = xAxisBottom; xAxisTop.LabelsVisible = false; xAxisTop.TicksVisible = true; xAxisTop.GridLines.Visibility = Visibility.Collapsed; xAxisTop.BindToAxis(xAxisBottom); // yAxisLeft = new YAxis(); yAxisLeft.SetValue(YAxis.YAxisPositionProperty, YAxisPosition.Left); yAxisRight = new YAxis(); yAxisRight.SetValue(YAxis.YAxisPositionProperty, YAxisPosition.Right); // yAxes = new YAxis2DCollection(plotPanel); yAxes.Add(yAxisLeft); yAxes.Add(yAxisRight); yAxis = yAxisLeft; yAxisRight.LabelsVisible = false; yAxisRight.TicksVisible = true; yAxisRight.GridLines.Visibility = Visibility.Collapsed; yAxisRight.BindToAxis(yAxisLeft); // UpdateTicks(); }
public Axes2D(PlotPanel plotPanel) { this.plotPanel = plotPanel; frame = new AxesFrame(); frame.SetValue(Grid.ZIndexProperty, 300); // note that individual axes have index of 200 plotPanel.Children.Add(frame); xAxisBottom = new XAxis(); xAxisBottom.SetValue(XAxis.XAxisPositionProperty, XAxisPosition.Bottom); // xAxes = new XAxis2DCollection(plotPanel); xAxes.Add(xAxisBottom); // yAxisLeft = new YAxis(); yAxisLeft.SetValue(YAxis.YAxisPositionProperty, YAxisPosition.Left); // yAxes = new YAxis2DCollection(plotPanel); yAxes.Add(yAxisLeft); // UpdateTicks(); }