IsRunning="{Binding IsBusy}"
                  
                  
                                             IsVisible="{Binding IsBusy}"
                  
                  
                                             VerticalOptions="Center" 
                  
                  
                                             BackgroundColor="Black"
                  
                  
                                             />
                  
                  
                  
                  
                  
                      public class MainPageVM : INotifyPropertyChanged
                  
                  
                      {
                  
                  
                          bool isBusy;
                  
                  
                          public bool IsBusy
                  
                  
                          {
                  
                  
                              get { return isBusy; }
                  
                  
                              set
                  
                  
                              {
                  
                  
                                  SetProperty(ref isBusy, value, "IsBusy");
                  
                  
                              }
                  
                  
                          }
                  
                  
                          protected bool SetProperty<T>(ref T backingStore, T value,
                  
                  
                              [CallerMemberName]string propertyName = "",
                  
                  
                              Action onChanged = null)
                  
                  
                          {
                  
                  
                              if (EqualityComparer<T>.Default.Equals(backingStore, value))
                  
                  
                                  return false;
                  
                  
                  
                  
                  
                              backingStore = value;
                  
                  
                              onChanged?.Invoke();
                  
                  
                              OnPropertyChanged(propertyName);
                  
                  
                              return true;
                  
                  
                          }
                  
                  
                  
                  
                  
                          public void OnPropertyChanged([CallerMemberName]string propertyName = null)
                  
                  
                          {
                  
                  
                              PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
                  
                  
                          }
                  
                  
                  А вот само присвоение IsBusy
                  
                  
                  
                  
                  
                  async void DoDisconnect()
                  
                  
                          {
                  
                  
                              try
                  
                  
                              {
                  
                  
                                  IsBusy = true;
                  
                  
                                  await mgr.DisConnectAsync();
                  
                  
                              }
                  
                  
                              finally
                  
                  
                              {
                  
                  
                                  IsBusy = false;
                  
                  
                              }
                  
                  
                          }
                  
                  
                
лучше такую нотификацию свойств выбросить и использовать ReactiveUI + Fody
а можно код страницы?
Обсуждают сегодня