public ChartPlotter() { horizontalAxis.TicksChanged += OnHorizontalAxisTicksChanged; verticalAxis.TicksChanged += OnVerticalAxisTicksChanged; SetIsDefaultAxis(horizontalAxis as DependencyObject, true); SetIsDefaultAxis(verticalAxis as DependencyObject, true); mouseNavigation = new MouseNavigation(); keyboardNavigation = new KeyboardNavigation(); defaultContextMenu = new DefaultContextMenu(); horizontalAxisNavigation = new AxisNavigation { Orientation = Orientation.Horizontal }; verticalAxisNavigation = new AxisNavigation { Orientation = Orientation.Vertical }; Children.AddMany( horizontalAxis, verticalAxis, axisGrid, mouseNavigation, keyboardNavigation, defaultContextMenu, horizontalAxisNavigation, verticalAxisNavigation, legend ); SetAllChildrenAsDefault(); }
/// <summary> /// Initializes a new instance of the <see cref="ChartPlotter"/> class. /// </summary> public ChartPlotter() : base() { NewLegendVisible = false; legend.LegendLeft = 10; legend.LegendRight = Double.NaN; horizontalAxis.TicksChanged += OnHorizontalAxisTicksChanged; verticalAxis.TicksChanged += OnVerticalAxisTicksChanged; SetIsDefaultAxis(horizontalAxis as DependencyObject, true); SetIsDefaultAxis(verticalAxis as DependencyObject, true); mouseNavigation = new MouseNavigation(); keyboardNavigation = new KeyboardNavigation(); defaultContextMenu = new DefaultContextMenu(); horizontalAxisNavigation = new AxisNavigation { Placement = AxisPlacement.Bottom }; verticalAxisNavigation = new AxisNavigation { Placement = AxisPlacement.Left }; Children.AddMany( horizontalAxis, verticalAxis, axisGrid, mouseNavigation, keyboardNavigation, defaultContextMenu, horizontalAxisNavigation, legend, verticalAxisNavigation, new LongOperationsIndicator(), newLegend ); #if DEBUG Children.Add(new DebugMenu()); #endif SetAllChildrenAsDefault(); }