title: How to bind dependency property to UI for silverlight user control?
body: <p>I tried to create a user control as:</p>
  
  <pre><code>public partial class MyTextBlock : UserControl
    {
      public MyTextBlock()
        {
       InitializeComponent();
        }
  
       public static readonly DependencyProperty LabelProperty
        = DependencyProperty.RegisterAttached("Label", typeof(string), typeof(MyTextBlock), null);
  
       public string Label
          {
              get { return (string)GetValue(LabelProperty); }
              set { SetValue(LabelProperty, value); }
          }
  
  
       public static readonly DependencyProperty MyTextProperty
        = DependencyProperty.RegisterAttached("MyText", typeof(string), typeof(MyTextBlock), null);
  
       public string MyText
          {
              get { return (string)GetValue(MyTextProperty); }
              set { SetValue(MyTextProperty, value); }
          }
  }
  </code></pre>
  
  <p>And its xaml is:</p>
  
  <pre><code>&lt;Grid x:Name="LayoutRoot"&gt;
     &lt;TextBlock x:Name="Title"  Text="{Binding Label}" /&gt;
     &lt;TextBlock x:Name="MyText" Text="{Binding MyText}" TextWrapping="Wrap"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Want I want is trying to binding dependency property in this control to UI elements, so that when i use this control, I can set data binding like:</p>
  
  <pre><code> &lt;local:MyTextBlock Label="{Binding ....}" MyText = "{Binding ....}" /&gt;
  </code></pre>
  
  <p>But When I did as above, it's not working. No data bound, no error. How to fix it?</p>