title: Get value from one textbox to another XAML
body: <p>I have created a text box which when focused brings up a popup box with other text box's as options.. and when pressed closes the popup box.. but I'd like that to then take the value from whichever text box I have selected and add into the original text box. Is this possible? I'm new to wpf so forgive me!</p>
  
  <p>Here is my code so far.</p>
  
  <pre><code> &lt;Grid&gt;
  
      &lt;StackPanel Margin="0,51,0,-51"&gt;
          &lt;TextBox  x:Name="text" GotKeyboardFocus="text_GotKeyboardFocus" Margin="158,0,169,0" Height="24" Text="Select Your Time..." /&gt;
  
          &lt;Popup x:Name="popup" Width="282" Height="300" PlacementTarget="{Binding ElementName=text}"&gt;
              &lt;Grid&gt;
                  &lt;StackPanel&gt;
                      &lt;TextBox  x:Name="text2" Background="White" Margin="10" GotKeyboardFocus="text_GotKeyboardFocus2" Cursor="Arrow" Height="24" Text="1 second" /&gt;
                      &lt;TextBox  x:Name="text3" Background="White" Margin="10" GotKeyboardFocus="text_GotKeyboardFocus2" Cursor="Arrow" Height="24" Text="2 second" /&gt;
                      &lt;TextBox  x:Name="text4" Background="White" Margin="10" GotKeyboardFocus="text_GotKeyboardFocus2" Cursor="Arrow" Height="24" Text="3 second" /&gt;
                      &lt;TextBox  x:Name="text5" Background="White" Margin="10" GotKeyboardFocus="text_GotKeyboardFocus2" Cursor="Arrow" Height="24" Text="4 second" /&gt;
                      &lt;TextBox  x:Name="text6" Background="White" Margin="10" GotKeyboardFocus="text_GotKeyboardFocus2" Cursor="Arrow" Height="24" Text="5 second" /&gt;
                  &lt;/StackPanel&gt;
              &lt;/Grid&gt;
          &lt;/Popup&gt;
  
      &lt;/StackPanel&gt;
  
  
  
  
  &lt;/Grid&gt;
  
  
  
  
   private void text_GotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
      {
          popup.IsOpen = true;
      }
  
      private void text_GotKeyboardFocus2(object sender, RoutedEventArgs e)
      {
          popup.IsOpen = false;
      }
  </code></pre>