Beispiel #1
0
        public static void UpdateColor(this MauiActivityIndicator mauiActivityIndicator, IActivityIndicator activityIndicator, object?foregroundDefault)
        {
            Color color = activityIndicator.Color;

            if (color.IsDefault())
            {
                if (foregroundDefault != null)
                {
                    mauiActivityIndicator.RestoreForegroundCache(foregroundDefault);
                }
            }
            else
            {
                mauiActivityIndicator.Foreground = color.ToNative();
            }
        }
Beispiel #2
0
 public static void UpdateIsRunning(this MauiActivityIndicator mauiActivityIndicator, IActivityIndicator activityIndicator)
 {
     // TODO: Use IView Opacity if the ActivityIndicator is running.
     mauiActivityIndicator.ElementOpacity = activityIndicator.IsRunning ? 1 : 0;
 }
Beispiel #3
0
 public static void UpdateColor(this MauiActivityIndicator mauiActivityIndicator, IActivityIndicator activityIndicator)
 {
     mauiActivityIndicator.UpdateColor(activityIndicator, null);
 }
Beispiel #4
0
 public static void UpdateIsRunning(this MauiActivityIndicator mauiActivityIndicator, IActivityIndicator activityIndicator)
 {
     mauiActivityIndicator.ElementOpacity = activityIndicator.IsRunning ? activityIndicator.Opacity : 0;
 }