Exemplo n.º 1
0
        private static void IsActiveChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            ProgressRing ring = dependencyObject as ProgressRing;

            if (ring != null)
            {
                ring.UpdateActiveState();
            }
        }
Exemplo n.º 2
0
        private static void IsLargeChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            ProgressRing ring = dependencyObject as ProgressRing;

            if (ring != null)
            {
                ring.UpdateLargeState();
            }
        }
Exemplo n.º 3
0
        private static void BindableWidthCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            ProgressRing ring = dependencyObject as ProgressRing;

            if (ring != null)
            {
                Action item = delegate
                {
                    ring.SetEllipseDiameter((double)dependencyPropertyChangedEventArgs.NewValue);
                    ring.SetEllipseOffset((double)dependencyPropertyChangedEventArgs.NewValue);
                    ring.SetMaxSideLength((double)dependencyPropertyChangedEventArgs.NewValue);
                };
                if (ring._deferredActions != null)
                {
                    ring._deferredActions.Add(item);
                }
                else
                {
                    item();
                }
            }
        }