Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the Visifire.Charts.Axis class
        /// </summary>
        public Axis()
        {
            // Initialize list of ChartGrid list
            Grids = new ChartGridCollection();

            // Initialize list of Ticks list 
            Ticks = new TicksCollection();

            // Initialize AxisLabels element
            AxisLabels = new AxisLabels();

            // Attach event handler on collection changed event with chart grid collection
            Grids.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Grids_CollectionChanged);

            // Attach event handler on collection changed event with ticks collection
            Ticks.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Ticks_CollectionChanged);

            InternalAxisMinimum = Double.NaN;
            InternalAxisMaximum = Double.NaN;

        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the Visifire.Charts.Axis class
        /// </summary>
        public Axis()
        {
            // Apply default style from generic
#if WPF
            if (!_defaultStyleKeyApplied)
            {
                DefaultStyleKeyProperty.OverrideMetadata(typeof(Axis), new FrameworkPropertyMetadata(typeof(Axis)));
                _defaultStyleKeyApplied = true;
            }
#else
            DefaultStyleKey = typeof(Axis);
#endif

            // Initialize list of ChartGrid list
            Grids = new ChartGridCollection();

            // Initialize list of Ticks list 
            Ticks = new TicksCollection();

            // Initialize CustomLabel list
            CustomAxisLabels = new CustomAxisLabelsCollection();

            // Initialize AxisLabels element
            //AxisLabels = new AxisLabels();

            // Attach event handler on collection changed event with chart grid collection
            Grids.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Grids_CollectionChanged);

            // Attach event handler on collection changed event with ticks collection
            Ticks.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Ticks_CollectionChanged);

            CustomAxisLabels.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(CustomLabels_CollectionChanged);
            
            InternalAxisMinimum = Double.NaN;
            InternalAxisMaximum = Double.NaN;
        }