예제 #1
0
        private static void Clock_SecondAngleChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            CircularClock clock = (CircularClock)sender;

            // trainée des secondes
            if (clock.GetTemplateChild(SecondTrailPartName) is Path trailPath)
            {
                trailPath.Stroke          = clock.SecondTrailBrush;
                trailPath.StrokeThickness = clock.StrokeThickness / 2;

                int size = (int)(trailPath.StrokeThickness / 2);

                int radius = clock.Radius + size;

                clock.RenderArcForTrail(clock.SecondAngle, radius, trailPath);
            }
        }
예제 #2
0
        private static void Clock_DurationChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            CircularClock clock = (CircularClock)sender;

            clock.UpdateTime();
        }