title: DependencyPropert not set from XAML with DynamicResource as parameter
body: <p>I'm trying to develop a custom tri-state button user control and so far I've been using CTF to set properties. <br />
  But I would like to change this to be using the WPF property system with PropertiesDependencies. <br /><br />
  Unfortunately I don't manage to make it work, when I set the property from my xaml (father) using a DynamicResource, the value is not set.</p>
  
  <pre><code>&lt;common:StateImageButton x:Name="story_buttonRecord"  BackTest="{DynamicResource backTest}" /&gt;
  </code></pre>
  
  <p>Here is the code I have in my button controller :</p>
  
  <pre><code>public ImageSource BackTest
      {
          get { return (ImageSource)this.GetValue(BackProp); }
          set { this.SetValue(WidthProp,value); }
      }
  
      public static readonly DependencyProperty BackProp =
          DependencyProperty.Register(
              "BackTest",
              typeof(ImageSource),
              typeof(StateImageButton),
              new FrameworkPropertyMetadata());
  </code></pre>
  
  <p>I don't even use the property in my button xaml yet, but it apparently doesn't even enter in the Setter. I've been searching a lot online without success. So maybe I'm missing something .</p>
  
  <p>Thanks in advance for your help, 
  Boris</p>