title: Make Button enabled/disabled depending on the TextBox Text property in WPF?
body: <p>I was looking for code through google that enables and disables a button based on the text property from a textbox. If the textbox has some text then the button should be enabled or otherwise button should be disabled.</p>
  
  <p>I got some code but code in xaml but no c#. I am not being able to understand how it works.</p>
  
  <p>Please help me to understand the behaviour of the following code:</p>
  
  <pre><code>&lt;TextBox Name="txtName" Width="100" Height="30"&gt;&lt;/TextBox&gt;
  
  &lt;Button Content="Add Name " Width="100" Height="30" 
    IsEnabled="{Binding ElementName=txtName, Path=Text.Length, Mode=OneWay}"/&gt;
  </code></pre>
  
  <p>How is the IsEnabled button property working? How is true and false set to the IsEnabled property? What is Path? How does it work?</p>