title: Enable/Disable Button, by rows in Grid
body: <p>I have following code. Here <code>listClear</code> is an object, which is filled by ViewModel. I am using properties of this object to fill a <code>Grid</code>. In below code what property should I use to make <code>Button</code> disable in <code>DataTrigger</code>. I want <code>Button</code> to be disabled when <code>Grid</code> is empty, otherwise it should be enabled.</p>
  
  <pre><code>&lt;Button Grid.Column="3" Margin="2" Command="{Binding Path=ClearCommand}" Content="Clear"&gt;
      &lt;Button.Style&gt;
          &lt;Style TargetType="Button"&gt;
              &lt;Setter Property="IsEnabled" Value="True" /&gt;
  
                  &lt;Style.Triggers&gt;
                      &lt;DataTrigger Binding="{Binding Path=listClear}" Value=""&gt;
                          &lt;Setter Property="IsEnabled" Value="False"/&gt;
                      &lt;/DataTrigger&gt;
                  &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/Button.Style&gt;
  &lt;/Button&gt;
  </code></pre>