You'll need to build your solution without using a TextBox
if you want to not show a keyboard. For a consistent, cross-application experience, the keyboard always shows on the Windows Phone and is not programmatically controllable.
A similar question was asked recently, but the answers weren't accurate.
The best answer at this time may be to consider an alternate UI for your application.
However, a hack would be to try to emulate the basics by using a TextBlock
. You'd need to measure the location of each character and when the TextBlock
is tapped, place a rectangle in between two characters (and then start it blinking by using an animation). If the text may not fit though, the complexity increases, as does the opportunity for edge cases. Further, you'll likely want to handle operations like copy and paste from the text field.
As your comments indicate that you want to build a telephone dialer keypad, I'd suggest you instead consider using:
<TextBox InputScope="TelephoneCountryCode" />
The results will look similar to this:
There are other options as well for telephone keypads documented here.
As this dialer keypad would be a standard experience for Windows Phone users, they wouldn't need to learn another keypad within your application and it's nuances.
Using Google Voice on iOS for example, they've chosen to implement their own keypad. However, you may notice they don't support positioning the text-input cursor. A user can paste a number and delete digits.