static private UpdatePieDataPointGeometry ( |
||
pieDataPoint | PieDataPoint instance. | |
plotAreaWidth | double | PlotArea width. |
plotAreaHeight | double | PlotArea height. |
return | void |
/// <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); } }
/// <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); }; } }