<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<StackPanel Orientation="Vertical">
<TextBlock Text="Hides soft keyboard on enter:" />
<TextBox x:Name="textBox" />
<TextBlock Text="Normal text box:" />
<TextBox />
</StackPanel>
</Grid>
public MainPage()
{
InitializeComponent();
this.textBox.KeyUp += new KeyEventHandler(textBox_KeyUp);
}
void textBox_KeyUp(object sender, KeyEventArgs e)
{
// if the enter key is pressed
if (e.Key == Key.Enter)
{
textBox.Focus();
}
}