Ejemplo n.º 1
0
        static void SetTextBasedOnBusy(LoadingButton control, bool isBusy, string text)
        {
            var activityIndicator = GetActivityIndicator(control);
            var button            = GetButton(control);

            if (activityIndicator == null || button == null)
            {
                return;
            }

            activityIndicator.IsVisible = activityIndicator.IsRunning = isBusy;
            button.Text = isBusy ? string.Empty : control.Text;
        }
Ejemplo n.º 2
0
 static Button GetButton(LoadingButton control)
 {
     return(control.Children[0] as Button);
 }
Ejemplo n.º 3
0
 static ActivityIndicator GetActivityIndicator(LoadingButton control)
 {
     return(control.Children[1] as ActivityIndicator);
 }