UpdatePieDataPointGeometry() static private method

Updates the PieDataPoint's Geometry property.
static private UpdatePieDataPointGeometry ( PieDataPoint pieDataPoint, double plotAreaWidth, double plotAreaHeight ) : void
pieDataPoint PieDataPoint PieDataPoint instance.
plotAreaWidth double PlotArea width.
plotAreaHeight double PlotArea height.
return void
コード例 #1
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);
            }
        }
コード例 #2
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);
                };
            }
        }