title: WPF MVVM call methode if textbox text changed
body: <p>How can I call up a method, which check if textbox is null and disabled a button, when textbox text is changed.</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;Button x:Name="button1" Content="Save" IsEnabled="{Binding BtnIsEnabled}" 
  
  &lt;TextBox x:Name="textBox1" Text="{Binding SelectedItem.username, ElementName=Users, UpdateSourceTrigger=PropertyChanged}" 
  </code></pre>
  
  <p>My Method:</p>
  
  <pre><code>    public void SaveBtnEnable()
      {
          if (!((string.IsNullOrEmpty(username)) || (string.IsNullOrEmpty(name)) || (string.IsNullOrEmpty(email))))
          {
              BtnIsEnabled = true;
          }
          else
          {
              BtnIsEnabled = false;
          }
      }
  
  
  
      private Boolean _BtnIsEnabled;
      public Boolean BtnIsEnabled
      {
          get
          {
              return _BtnIsEnabled;
          }
          set
          {
              _BtnIsEnabled = value;
              OnPropertyChanged("BtnIsEnabled");
          }
      }
  </code></pre>