title: WPF user control bind data to user control property
body: <p>I have user control:</p>
  
  <p>xaml</p>
  
  <pre><code>&lt;UserControl x:Class="controlmaker.checkButton"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           mc:Ignorable="d" 
           d:DesignHeight="114" d:DesignWidth="221"&gt;
  &lt;Grid Background="Aqua" &gt;
      &lt;CheckBox Content="CheckBox" Height="16" HorizontalAlignment="Left" Margin="58,24,0,0" Name="checkBox1" VerticalAlignment="Top" /&gt;
      &lt;Button Content="{Binding buttText}" Height="23" HorizontalAlignment="Left" Margin="58,57,0,0" Name="button1" VerticalAlignment="Top" Width="75" /&gt;
  &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>code behind</p>
  
  <pre><code>public partial class checkButton : UserControl
  {
      public checkButton()
      {
          InitializeComponent();
      }
  
  
      public static readonly DependencyProperty buttTextProperty =
  DependencyProperty.Register("buttText", typeof(String),
  typeof(checkButton), new FrameworkPropertyMetadata(string.Empty));
  
      public String buttText
      {
          get { return GetValue(buttTextProperty).ToString(); }
          set { SetValue(buttTextProperty, value); }
      }
  
  
  }
  </code></pre>
  
  <p>and main window xaml</p>
  
  <pre><code>&lt;Window x:Class="controlmaker.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525" xmlns:my="clr-namespace:controlmaker"&gt;
  &lt;Grid&gt;
      &lt;my:checkButton buttText="aka"  HorizontalAlignment="Left" Margin="145,115,0,0" x:Name="checkButton1" VerticalAlignment="Top" Height="133" Width="250" /&gt;
  &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>I want to bind user control property in window xaml and bind it in user control to button content property. How to do it?</p>