Exemplo n.º 1
0
        static void UpdateRefreshColor(IRefreshViewHandler handler)
        {
            var color = handler.VirtualView?.RefreshColor?.ToColor()?.ToPlatform();

            if (color != null)
            {
                handler.PlatformView.RefreshControl.TintColor = color;
            }
        }
Exemplo n.º 2
0
        static void UpdateRefreshColor(IRefreshViewHandler handler)
        {
            if (handler.VirtualView == null || handler.PlatformView?.Visualizer == null)
            {
                return;
            }

            handler.PlatformView.Visualizer.Foreground = handler.VirtualView.RefreshColor != null
                                ? handler.VirtualView.RefreshColor.ToPlatform()
                                : (WBrush)UI.Xaml.Application.Current.Resources["DefaultTextForegroundThemeBrush"];
        }
Exemplo n.º 3
0
        static void UpdateBackground(IRefreshViewHandler handler)
        {
            if (handler.PlatformView?.Visualizer == null)
            {
                return;
            }

            if (handler.VirtualView.Background != null)
            {
                handler.PlatformView.Visualizer.Background = handler.VirtualView.Background.ToPlatform();
            }
        }
Exemplo n.º 4
0
        static void UpdateBackground(IRefreshViewHandler handler)
        {
            if (handler.VirtualView.Background == null)
            {
                return;
            }

            var color = handler.VirtualView.Background.ToColor()?.ToInt();

            if (color != null)
            {
                handler.PlatformView.SetProgressBackgroundColorSchemeColor(color.Value);
            }
        }
Exemplo n.º 5
0
        static void UpdateRefreshColor(IRefreshViewHandler handler)
        {
            if (handler.VirtualView.RefreshColor == null)
            {
                return;
            }

            var color = handler.VirtualView.RefreshColor.ToColor()?.ToInt();

            if (color != null)
            {
                handler.PlatformView.SetColorSchemeColors(color.Value);
            }
        }
Exemplo n.º 6
0
 public static void MapContent(IRefreshViewHandler handler, IRefreshView refreshView)
 {
 }
Exemplo n.º 7
0
 public static void MapIsRefreshing(IRefreshViewHandler handler, IRefreshView refreshView)
 {
 }
Exemplo n.º 8
0
 static void UpdateContent(IRefreshViewHandler handler)
 {
     handler.PlatformView.Content =
         handler.VirtualView.Content.ToPlatform(handler.MauiContext !);
 }
Exemplo n.º 9
0
 public static void MapRefreshViewBackground(IRefreshViewHandler handler, IView view)
 => UpdateBackground(handler);
Exemplo n.º 10
0
 public static void MapContent(IRefreshViewHandler handler, IRefreshView refreshView)
 => UpdateContent(handler);
Exemplo n.º 11
0
 public static void MapIsRefreshing(IRefreshViewHandler handler, IRefreshView refreshView)
 => (handler as RefreshViewHandler)?.UpdateIsRefreshing();
Exemplo n.º 12
0
 static void UpdateContent(IRefreshViewHandler handler) =>
 handler.PlatformView.UpdateContent(handler.VirtualView.Content, handler.MauiContext);
Exemplo n.º 13
0
 static void UpdateIsRefreshing(IRefreshViewHandler handler)
 {
     handler.PlatformView.IsRefreshing = handler.VirtualView.IsRefreshing;
 }
Exemplo n.º 14
0
 public static void MapIsEnabled(IRefreshViewHandler handler, IRefreshView refreshView)
 => handler.PlatformView?.UpdateIsEnabled(refreshView.IsEnabled);
Exemplo n.º 15
0
 public static void MapBackground(IRefreshViewHandler handler, IRefreshView view)
 => handler.PlatformView.RefreshControl.UpdateBackground(view);
Exemplo n.º 16
0
 public static void MapRefreshColor(IRefreshViewHandler handler, IRefreshView refreshView)
 {
 }
Exemplo n.º 17
0
 public static void MapRefreshViewBackground(IRefreshViewHandler handler, IView view)
 {
 }
Exemplo n.º 18
0
 public static void MapRefreshColor(IRefreshViewHandler handler, IRefreshView refreshView)
 => UpdateRefreshColor(handler);