title: how to bind a textbox value from User Control to another Window in wpf?
body: <p>I have a User control. There i have a textbox. If i set any value in the textbox, then i click "Select" button in the User control. what i want is, in my window page, i have another textbox. I want to Bind the Text value which is already selected in the User control textbox. I have the following code.
  User control:</p>
  
  <pre><code>   &lt;UserControl x:Class="Usercontrol1" x:Name="root"&gt;
     &lt;Grid DataContext="{Binding ElementName=root}"&gt;
              &lt;TextBox HorizontalAlignment="Right" VerticalAlignment="Center" 
                 x:Name="txtAuto" TextWrapping="NoWrap" /&gt;
              &lt;Button Name="btn_setectedType" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Select"  Click="btn_setectedType_Click"/&gt;                
  
     &lt;/Grid&gt;
    &lt;/UserControl&gt;
  </code></pre>
  
  <p>this is my Window page..</p>
  
  <pre><code>  &lt;Window x:Class="Window1" Title="Facility" &gt;
  
        &lt;Grid&gt;
           &lt;TextBox x:Name="txtUserSelection" HorizontalAlignment="Left"  Text="{Binding ???}" VerticalAlignment="Top" /&gt;
        &lt;/Grid&gt;
   &lt;/Window&gt;
  </code></pre>
  
  <p>I don't know how to continue further. i tried to create Object for this Window and tried to pass directly from User Control. but it fails. My requirement is, whenever i change the value in Usercontrol, the value should bind on the Textbox in Window. Could anyone please help? </p>