private void OnAdapterSelectionComplete(object sender, RoutedEventArgs e)
{
IsDropDownOpen = false;
// Completion will update the selected value
UpdateTextCompletion(false);
// Text should not be selected
if(TextBox != null)
{
TextBox.Select(TextBox.Text.Length, 0);
}
#if SILVERLIGHT
Focus();
#else
// Focus is treated differently in SL and WPF.
// This forces the textbox to get keyboard focus, in the case where
// another part of the control may have temporarily received focus.
if(TextBox != null)
{
Keyboard.Focus(TextBox);
}
else
{
Focus();
}
#endif
}