Пример #1
0
 private static void IsVisibleChanged(ProgressRing ring, AvaloniaPropertyChangedEventArgs e)
 {
     if (e.NewValue != e.OldValue)
     {
         if ((bool)e.NewValue == false)
         {
             ring.SetValue(ProgressRing.IsActiveProperty, false);
         }
         else
         {
             ring.SetValue(ProgressRing.IsActiveProperty, true);
         }
     }
 }
Пример #2
0
        private static void BindableWidthCallback(ProgressRing ring, AvaloniaPropertyChangedEventArgs e)
        {
            //var action = new Action(() =>
            //{
            ring.SetEllipseDiameter((double)e.NewValue);
            ring.SetEllipseOffset((double)e.NewValue);
            ring.SetMaxSideLength((double)e.NewValue);
            //});

            //if (ring._deferredActions != null)
            //    ring._deferredActions.Add(action);
            //else
            //    action();
        }
Пример #3
0
 private static void IsActiveChanged(ProgressRing ring, AvaloniaPropertyChangedEventArgs e)
 {
     //if(e.NewValue is bool)
     //    ring.IsVisible = (bool)e.NewValue;
     ring.UpdateActiveState();
 }
Пример #4
0
 private static void OnSizeChanged(ProgressRing ring, AvaloniaPropertyChangedEventArgs e)
 {
     ring.SetValue(BindableWidthProperty, ring.Width);
 }
Пример #5
0
 private static void IsLargeChangedCallback(ProgressRing ring, AvaloniaPropertyChangedEventArgs e)
 {
     ring.UpdateLargeState();
 }
Пример #6
0
 private static void BindableWidthCallback(ProgressRing ring, AvaloniaPropertyChangedEventArgs e)
 {
     ring.SetEllipseDiameter((double)e.NewValue);
     ring.SetEllipseOffset((double)e.NewValue);
     ring.SetMaxSideLength((double)e.NewValue);
 }
Пример #7
0
 private static void IsActiveChanged(ProgressRing ring, AvaloniaPropertyChangedEventArgs e)
 {
     ring.UpdatePseudoClasses();
 }