I have to fields in a page, username & password. while clicking enter on username TextBox i want to move focus to PasswordBox, the focus comes correctly but the keyboard gets closed. how can i keep the keyboard open?
if (p.OriginalSource is PasswordBox)
{
loginCommand.Execute(null);
}
else if (p.OriginalSource is TextBox) //assuming there is no third box that can handle
{
var element = (p.OriginalSource as TextBox).FindName("passwordbox");
var ss = ((WatermarkPasswordBox)element).Focus();
((WatermarkPasswordBox)element).UpdateLayout();
//((WatermarkPasswordBox)element).Password = "";
}