Example #1
0
        static void SetTextBasedOnBusy(BusyButton 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;
        }
Example #2
0
 static Button GetButton(BusyButton control)
 {
     return(control.Children[0] as Button);
 }
Example #3
0
 static ActivityIndicator GetActivityIndicator(BusyButton control)
 {
     return(control.Children[1] as ActivityIndicator);
 }