// hide and show busy dialog
 public static void SetBusy(bool busy, string text = null)
 {
     WindowWrapper.Current().Dispatcher.Dispatch(() =>
     {
         var modal = Window.Current.Content as ModalDialog;
         if (modal == null)
             return;
         var view = modal.ModalContent as BusyControl;
         if (view == null)
             modal.ModalContent = view = new BusyControl();
         modal.IsModal = view.IsBusy = busy;
         view.BusyText = text;
     });
 }
 // hide and show busy dialog
 public static void SetBusy(bool busy, string text = null)
 {
     WindowWrapper.Current().Dispatcher.Dispatch(() =>
     {
         var modal = Window.Current.Content as ModalDialog;
         if (modal == null)
         {
             return;
         }
         var view = modal.ModalContent as BusyControl;
         if (view == null)
         {
             modal.ModalContent = view = new BusyControl();
         }
         modal.IsModal = view.IsBusy = busy;
         view.BusyText = text;
     });
 }