Beispiel #1
0
        public Axis()
        {
            DataTransform = new IdentityDataTransform();
            Ticks         = new double[0];

            majorTicksPath = new Path();
            minorTicksPath = new Path();
            Children.Add(majorTicksPath);
            Children.Add(minorTicksPath);

            BindingOperations.SetBinding(majorTicksPath, Path.StrokeProperty, new Binding("Foreground")
            {
                Source = this, Mode = BindingMode.TwoWay
            });
            BindingOperations.SetBinding(minorTicksPath, Path.StrokeProperty, new Binding("Foreground")
            {
                Source = this, Mode = BindingMode.TwoWay
            });

            if (ticksProvider == null)
            {
                this.ticksProvider = new TicksProvider();
            }
        }
Beispiel #2
0
 public Axis(TicksProvider ticksProvider)
     : this()
 {
     this.ticksProvider = ticksProvider;
 }