Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        private static void OnPlacementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AxisNavigation navigation = (AxisNavigation)d;

            navigation.OnPlacementChanged();
        }