When a user clicks into a TextBox in WP7, the software keyboard automatically slides up from the bottom of the screen (if you don’t have a hardware keyboard, at least). Once the TextBox loses focus (such as when the user clicks on the page itself), the keyboard slides out of view. Therefore, if you want to hide the keyboard in response to, say, the enter key being pressed on the keyboard, you just need to map an event handler to the KeyUp event, check if the Event’s KeyPressed is Key.Enter, and if it is, set the PhoneApplicationPage to have focus. Pretty simple!
Thanks to this blog post for the tip.
Or grapes. Or a Wendy’s burger with the tinfoil still on.
The StackExchange family of websites is one I use pretty often, if not on a daily basis, as part of my job – StackOverflow in particular is a goldmine of useful programming tips and answers, and to its great merit it feels almost as indispensable as Google at times. I honestly think that if this was ten years ago, I would not be a very good programmer – but that’s a discussion for another time…
I will, however, be the first to admit that I am a horrible cook. My meal strategy generally revolves around what takes the least amount of effort with what is already around, with no real regard to “favour combinations” or “taste profiles”…I will happily eat microwaved rice and baked beans, or a cream cheese sandwich. To the rescue comes the Food and Cooking StackExchange beta! I am almost certain that over time, it’ll be just as good a resource as any for horrendous chefs like me, and will fill the technical hole that 1,000,000 recipe sites just don’t cover (and don’t get me started about Eat Your Books…)
If you wanted to know why you shouldn’t microwave bananas, Food and Cooking will tell you.