예제 #1
0
        private static void OnPercentageChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            SemiCircularProgressBar circularProgressBar = sender as SemiCircularProgressBar;

            if (circularProgressBar != null)
            {
                circularProgressBar.Angle = (circularProgressBar.Percentage * 180) / 100;
            }
        }
예제 #2
0
        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
                };
            }
        }
예제 #3
0
        private static void OnPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            SemiCircularProgressBar circularProgressBar = sender as SemiCircularProgressBar;

            circularProgressBar?.RenderArc();
        }