Наследование: DataPointSeries, IResourceDictionaryDispenser, IRequireGlobalSeriesIndex
Пример #1
0
        /// <summary>
        /// PaletteProperty property changed handler.
        /// </summary>
        /// <param name="d">Parent that changed its Palette.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnPalettePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PieSeries source = d as PieSeries;
            Collection <ResourceDictionary> newValue = e.NewValue as Collection <ResourceDictionary>;

            source.OnPalettePropertyChanged(newValue);
        }
Пример #2
0
        /// <summary>
        /// Called when the value of the ActualOffsetRatioProperty property changes.
        /// </summary>
        /// <param name="oldValue">The value to be replaced.</param>
        /// <param name="newValue">The new value.</param>
        private void OnActualOffsetRatioPropertyChanged(double oldValue, double newValue)
        {
            RoutedPropertyChangedEventHandler <double> handler = this.ActualOffsetRatioChanged;

            if (handler != null)
            {
                handler(this, new RoutedPropertyChangedEventArgs <double>(oldValue, newValue));
            }

            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                PieSeries.UpdatePieDataPointGeometry(this, ActualWidth, ActualHeight);
            }
        }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the PieDataPoint class.
        /// </summary>
        public PieDataPoint()
        {
            DefaultStyleKey = typeof(PieDataPoint);

            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                // Create default design-mode-friendly settings
                ActualRatio  = 0.2;
                SizeChanged += delegate(object sender, SizeChangedEventArgs e)
                {
                    // Handle SizeChanged event to update Geometry dynamically
                    PieSeries.UpdatePieDataPointGeometry(this, e.NewSize.Width, e.NewSize.Height);
                };
            }
        }