title: Fired datatrigger is not changing custom control's newly added property
body: <p>I am creating an animation control and where I am trying to use data triggers. The issue is the dp property which I created is not getting changed/called when the trigger is fired. Here is the summary of behaviour I noticed.</p>
  
  <p>1) The code behind of  never gets called.</p>
  
  <p>2) Property appears in XAML intellisense but the changes given in XAML never gets applied (design/runtime). But if I replace 'IsSpinning' in  "public static readonly DependencyProperty IsSpinningProperty = DependencyProperty.Register("IsSpinning", typeof(bool), typeof(ProgressWaitSpinner), new UIPropertyMetadata(false));" to something else( say 'xyz') it starts working for property assignment, but throws runtime exception if styles are enabled.</p>
  
  <p>3) When running the sample, The rectangle should be hidden instead of showing as Chocolate color, which is not happening.</p>
  
  <p>4) Setter for changing color is working, which is from the user control, however the setter property on newly created property is not working.</p>
  
  <p>I created a simplified sample here which shows the problem. Anyone got a clue what is going on please?</p>
  
  <p>UserControl XAML:</p>
  
  <pre><code>&lt;UserControl x:Class="CustomControls.ProgressWaitSpinner"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:CustomControls" 
      Height="191" Width="191"&gt;
      &lt;Grid x:Name="LayoutRoot"&gt;
          &lt;Label Height="32" Name="label1" VerticalAlignment="Top" /&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>UserControl Code:</p>
  
  <pre><code>using System.Windows;
  using System.Windows.Controls;
  
  namespace CustomControls
  {
      public partial class ProgressWaitSpinner : UserControl
      {
  
          public ProgressWaitSpinner(){InitializeComponent();}
  
          public bool IsSpinning
          {
              get 
              {
                  return (bool)GetValue(IsSpinningProperty); 
              }
              set
              {
                  if (value == true)
                  {
                      this.Visibility = System.Windows.Visibility.Visible;
                  }
                  else
                  {
                      this.Visibility = System.Windows.Visibility.Hidden;
                  }
                  SetValue(IsSpinningProperty, value); 
              }
          }
  
          public static readonly DependencyProperty IsSpinningProperty = DependencyProperty.Register("IsSpinning", typeof(bool), typeof(ProgressWaitSpinner), new UIPropertyMetadata(false));
      }
  }
  </code></pre>
  
  <p>MainWindow XAML:</p>
  
  <pre><code>&lt;Window x:Class="WPFSpinnerWait.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:usrctrl="clr-namespace:CustomControls"
          Title="MainWindow" Height="208" Width="228"&gt;
      &lt;Grid&gt;
          &lt;usrctrl:ProgressWaitSpinner Height="40" x:Name="WaitSpinner" Margin="110,103,0,0" HorizontalAlignment="Left" Width="84" VerticalAlignment="Top"&gt;
              &lt;usrctrl:ProgressWaitSpinner.Style&gt;
                  &lt;Style&gt;
                      &lt;Style.Triggers&gt;
                          &lt;MultiDataTrigger&gt;
                              &lt;MultiDataTrigger.Conditions&gt;
                                  &lt;Condition Binding="{Binding ElementName=label1, Path=Content}" Value="NotStarted"&gt;&lt;/Condition&gt;
                              &lt;/MultiDataTrigger.Conditions&gt;
                              &lt;Setter Property="usrctrl:ProgressWaitSpinner.Background" Value="Red" /&gt;
                              &lt;Setter Property="usrctrl:ProgressWaitSpinner.IsSpinning" Value="false"/&gt;
                          &lt;/MultiDataTrigger&gt;
                          &lt;MultiDataTrigger&gt;
                              &lt;MultiDataTrigger.Conditions&gt;
                                  &lt;Condition Binding="{Binding ElementName=label1, Path=Content}" Value="Running"&gt;&lt;/Condition&gt;
                              &lt;/MultiDataTrigger.Conditions&gt;
                              &lt;Setter Property="usrctrl:ProgressWaitSpinner.Background" Value="Chocolate" /&gt;
                              &lt;Setter Property="usrctrl:ProgressWaitSpinner.IsSpinning" Value="true" /&gt;
                          &lt;/MultiDataTrigger&gt;
                      &lt;/Style.Triggers&gt;
                  &lt;/Style&gt;
              &lt;/usrctrl:ProgressWaitSpinner.Style&gt;
          &lt;/usrctrl:ProgressWaitSpinner&gt;
          &lt;Button Content="NotStarted" Height="28" HorizontalAlignment="Left" Margin="38,22,0,0" Name="checkBox1" VerticalAlignment="Top" Width="136" Click="checkBox1_Checked" /&gt;
          &lt;Button Content="Running" Height="30" HorizontalAlignment="Left" Margin="38,56,0,0" Name="checkBox2" VerticalAlignment="Top" Width="136" Click="checkBox1_Checked" /&gt;
          &lt;Label Content="NotStarted" DataContext="usrctrl:ProgressWaitSpinner" Height="25" HorizontalAlignment="Left" Margin="38,92,0,0" Name="label1" VerticalAlignment="Top" Width="114" /&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>MainWindow Code:</p>
  
  <pre><code>using System.Windows;
  using System.Windows.Controls;
  
  namespace WPFSpinnerWait
  {
      /// &lt;summary&gt;
      /// Interaction logic for MainWindow.xaml
      /// &lt;/summary&gt;
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              InitializeComponent();
          }
  
          private void checkBox1_Checked(object sender, RoutedEventArgs e)
          {
              label1.Content = ((Button)sender).Content.ToString();
          }
  
      }
  }
  </code></pre>