title: WPF Dependency Property not being set
body: <p>I am trying to bind a dependency property via XAML to my custom WPF control.</p>
  
  <p>Here's how I register the dependency property:</p>
  
  <pre><code>public static readonly DependencyProperty AltNamesProperty = 
      DependencyProperty.Register ("AltNames", typeof(string), typeof(DefectImages));
  
  public string AltNames
  {
      get { return (string) GetValue(AltNamesProperty); }
      set { SetValue(AltNamesProperty, value); }
  }
  </code></pre>
  
  <p>And Here's how I call it in my XAML:</p>
  
  <pre><code>&lt;DataGrid.Columns&gt;                
      &lt;DataGridTemplateColumn IsReadOnly="True"&gt;
          &lt;DataGridTemplateColumn.CellTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel Name="StackPanel1" Grid.Column="0" Width="950"&gt;
                      &lt;TextBlock FontSize="16" TextDecorations="None" Text="{BindingPath=StandardName}" Foreground="Black"  FontWeight="Bold" Padding="5,10,0,0"&gt;&lt;/TextBlock&gt;
                      &lt;TextBlock Text="{Binding Path=AltNames}"TextWrapping="WrapWithOverflow" Padding="5,0,0,10"&gt;&lt;/TextBlock&gt;
                      &lt;!-- this part should be magic!! --&gt;
                      &lt;controls:DefectImages AltNames="{Binding Path=AltNames}"&gt;&lt;/controls:DefectImages&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/DataGridTemplateColumn.CellTemplate&gt;
      &lt;/DataGridTemplateColumn&gt;
  &lt;/DataGrid.Columns&gt;
  </code></pre>
  
  <p>I know the <code>AltNames</code> property that I'm attempting to bind to is a valid property because I can display it in a textblock just fine.  Am I registering the Dependency property incorrectly?</p>
  
  <p>What do I need to do to get the correct value assigned to <code>AltNames</code> in my code behind?</p>