title: How to disable and enable a button dynamically?
body: <p>In my UWP, I have a <code>TextBox</code> and a <code>Button.</code> I want to disable the <code>Button</code> when the <code>TextBox</code> is empty. </p>
  
  <p>I tried this on startup-</p>
  
  <pre><code>if (string.IsNullOrEmpty(hmmtxtBox.Text))
  {
      hmmbtn.IsEnabled = false;
  }
  </code></pre>
  
  <hr>
  
  <pre><code>private void HmmtxtBox_TextChanged(object sender, TextChangedEventArgs e)
  {
      hmmbtn.IsEnabled = true;
  }
  </code></pre>
  
  <p>It works kind of okay, but when I clear the <code>TextBox</code>, the <code>Button</code> remains enabled. I want to disable if the <code>TextBox</code> is empty and vice versa. </p>