title: WPF MultiDataTrigger AND condition
body: <p>I would like to enable a button only when both of my two datagrids have selected items. Right now it is enabled when either of the datagrids have selections. Any ideas?</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Button x:Name=&quot;button&quot; Content=&quot;Z&quot; Grid.Column=&quot;1&quot; Margin=&quot;0,240,0,0&quot; VerticalAlignment=&quot;Top&quot; FontFamily=&quot;Wingdings 3&quot; FontSize=&quot;21.333&quot; ToolTip=&quot;Set the selected alarm for the selected alarm time&quot;&gt;
      &lt;Button.Style&gt;
          &lt;Style TargetType=&quot;Button&quot;&gt;
              &lt;Setter Property=&quot;IsEnabled&quot; Value=&quot;True&quot; /&gt;
              &lt;Setter Property=&quot;Opacity&quot; Value=&quot;1&quot; /&gt;
              &lt;Style.Triggers&gt;
                  &lt;MultiDataTrigger&gt;
                      &lt;MultiDataTrigger.Conditions&gt;
                          &lt;Condition Binding=&quot;{Binding ElementName=alarmProfilesDataGrid, Path=SelectedItem}&quot; Value=&quot;{x:Null}&quot;/&gt;
                          &lt;Condition Binding=&quot;{Binding ElementName=alarmFilesDataGrid, Path=SelectedItem}&quot; Value=&quot;{x:Null}&quot;/&gt;
                      &lt;/MultiDataTrigger.Conditions&gt;
                      &lt;MultiDataTrigger.Setters&gt;
                          &lt;Setter Property=&quot;IsEnabled&quot; Value=&quot;False&quot; /&gt;
                          &lt;Setter Property=&quot;Opacity&quot; Value=&quot;.5&quot; /&gt;
                      &lt;/MultiDataTrigger.Setters&gt;
                  &lt;/MultiDataTrigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/Button.Style&gt;
  &lt;/Button&gt;
  </code></pre>