title: WPF : How should I change the style of a button when his context id changed?
body: <p>I have two button styles as static resources. <code>BtnStyleOpen</code> and <code>BtnStyleClose</code>.
  A button with <code>Name="V001"</code> and in .cs I Bound the context with an object
      <code>BtnV001.Content = content;</code> In content object there is a status property. 
  I would like to change the style of the button when the status is changed.
  My code is: </p>
  
  <pre><code>&lt;Button x:Name="Btn001" Grid.Column="5" Grid.Row="7"
  
                      Click="BtnV_Click" MouseRightButtonUp="BtnV_MouseRightButtonUp"
  
                      Content="{Binding Path=Status, UpdateSourceTrigger=PropertyChanged}"&gt;
  
  
                      &lt;Button.Triggers&gt;
                          &lt;Trigger Property="Content"  Value=1&gt;
                              &lt;Setter Property="Style" Value="{StaticResource BtnStyleOpen}" /&gt;
                          &lt;/Trigger&gt;
                          &lt;Trigger Property="Content"  Value=0&gt;
                              &lt;Setter Property="Style" Value="{StaticResource BtnStyleClose}" /&gt;
                          &lt;/Trigger&gt;
                      &lt;/Button.Triggers&gt;
                  &lt;/Button&gt;
  </code></pre>