Hi,
Here's a solution.
Right after shoing the ChildWindow, put he focus on the ChildWindow. But make sure to set the ChildWindow.FocusedElement property to your TextBox.
This way, as soon as the ChildWindow gets the focus, it will transmit it to its FocusedElement : your TextBox :
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF
Here's a solution.
Right after shoing the ChildWindow, put he focus on the ChildWindow. But make sure to set the ChildWindow.FocusedElement property to your TextBox.
This way, as soon as the ChildWindow gets the focus, it will transmit it to its FocusedElement : your TextBox :
<StackPanel>
<Button Content="Show/Hide"
Click="Button_Click" />
<xctk:ChildWindow x:Name="_childWindow"
FocusedElement="{Binding ElementName=myTextBox}">
<TextBox x:Name="myTextBox"
Text="MyName" />
</xctk:ChildWindow>
</StackPanel> private void Button_Click( object sender, RoutedEventArgs e )
{
if( _childWindow.WindowState == Xceed.Wpf.Toolkit.WindowState.Closed )
{
_childWindow.Show();
_childWindow.Focus();
}
else
{
_childWindow.Close();
}
}――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF