title: Binding of TextBlock inside Custom Control to dependency property of the same Custom Control
body: <p>I have a custom control with a TextBlock inside it:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type local:CustControl}"&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type local:CustControl}"&gt;
                  &lt;Border Background="Blue"
                          Height="26" 
                          Width="26" Margin="1"&gt;
  
                          &lt;TextBlock x:Name="PART_CustNo"
                                     FontSize="10"
                                     Text="{Binding Source=CustControl,Path=CustNo}" 
                                     Background="PaleGreen" 
                                     Height="24" 
                                     Width="24"
                                     Foreground="Black"&gt;
                          &lt;/TextBlock&gt;
  
                  &lt;/Border&gt;
               &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>And this Custom control has a dependency property:</p>
  
  <pre><code>    public class CustControl : Control
  {
      static CustControl()
      {
          DefaultStyleKeyProperty.OverrideMetadata(typeof(CustControl), new   FrameworkPropertyMetadata(typeof(CustControl)));
      }
  
      public readonly static DependencyProperty CustNoProperty = DependencyProperty.Register("CustNo", typeof(string), typeof(CustControl), new PropertyMetadata(""));
  
      public string CustNo
      {
          get { return (string)GetValue(CustNoProperty); }
          set { SetValue(CustNoProperty, value); }
      }
  
  }
  </code></pre>
  
  <p>I want the value of "CustNo" property be transfered in "Text" property of TextBlock in each instance of the Custom Control. 
  But my:</p>
  
  <pre><code>Text="{Binding Source=CustControl,Path=CustNo}"
  </code></pre>
  
  <p>isn't working.</p>
  
  <p>Isn't working also with Path=CustNoProperty:</p>
  
  <pre><code>Text="{Binding Source=CustControl,Path=CustNoProperty}"
  </code></pre>