|
In this post I will share my learning while creating an app. It is related to keyboard in Windows Phone 7.
Let's add a textblock and a textbox inside gridpanel of MainPage.xaml like below.
<TextBlock Text="Enter Key" Height="30" HorizontalAlignment="Left" Margin="10,15,0,0" Name="textDefault" VerticalAlignment="Top" FontSize="18" />
<TextBox InputScope="Default" Height="300" HorizontalAlignment="Left" Margin="100,0,0,0" Name="txtDefault" Text="" VerticalAlignment="Top" Width="350" />
Now run the application and hit enter key of windows phone 7 like shown below.

You will notice that Enter key won't work.
You need to add AcceptsReturn="True" in TextBox like below for enter key to work in Windows Phone 7.
<TextBlock Text="Enter Key" Height="30" HorizontalAlignment="Left" Margin="10,15,0,0" Name="textDefault" VerticalAlignment="Top" FontSize="18" />
<TextBox InputScope="Default" AcceptsReturn="True" Height="300" HorizontalAlignment="Left" Margin="100,0,0,0" Name="txtDefault" Text="" VerticalAlignment="Top" Width="350" />
Now run the application again and hit enter key, enter key will work this time.

This was my learning which I thought to share.
|