private static void OnPercentageChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { SemiCircularProgressBar circularProgressBar = sender as SemiCircularProgressBar; if (circularProgressBar != null) { circularProgressBar.Angle = (circularProgressBar.Percentage * 180) / 100; } }
private static void OnImageSourcePathChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { SemiCircularProgressBar circularProgressBar = sender as SemiCircularProgressBar; if (circularProgressBar?.ImageSourcePath != null) { circularProgressBar.InnerPathRoot.Fill = new ImageBrush { ImageSource = circularProgressBar.ImageSourcePath }; } }
private static void OnPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { SemiCircularProgressBar circularProgressBar = sender as SemiCircularProgressBar; circularProgressBar?.RenderArc(); }