<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Luis Guerrero EN &#187; guide</title>
	<atom:link href="http://luisguerrero.net/en/tag/guide/feed/" rel="self" type="application/rss+xml" />
	<link>http://luisguerrero.net/en</link>
	<description>.NET Stuff from London, Windows Phone 7, Silverlight, WPF and debugging</description>
	<lastBuildDate>Sat, 30 Apr 2011 15:44:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to access to Keyboard in XNA for Windows Phone 7</title>
		<link>http://luisguerrero.net/en/2010/07/17/how-to-access-to-keyboard-in-xna-from-windows-phone-7/</link>
		<comments>http://luisguerrero.net/en/2010/07/17/how-to-access-to-keyboard-in-xna-from-windows-phone-7/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 19:54:35 +0000</pubDate>
		<dc:creator>Guerrerotook</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://luisguerrero.net/en/2010/07/17/how-to-access-to-keyboard-in-xna-from-windows-phone-7/</guid>
		<description><![CDATA[One of the great thinks about developing on XNA is that you have access to low level graphics to draw your sprites and your 3d mesh, but sometimes you need some high level component to provide some functionality to the user like for example a keyboard. If you plan the user on Windows Phone 7 [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great thinks about developing on XNA is that you have access to low level graphics to draw your sprites and your 3d mesh, but sometimes you need some high level component to provide some functionality to the user like for example a keyboard.</p>
<p>If you plan the user on Windows Phone 7 to type the name to start a new game you need to create your own keyboard and textbox support. This can be a little bit hard, so that why Microsoft include a simple API to show a Task in the Phone in order the user write some text and return this string back to you.</p>
<p><a href="http://luisguerrero.net/en/files/2010/07/image.png" target="_blank"><img class="wlDisabledImage" style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="image" src="http://luisguerrero.net/en/files/2010/07/image_thumb.png" border="0" alt="image" width="266" height="484" /></a></p>
<div style="line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: consolas, 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;">
<pre style="line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">Guide.BeginShowKeyboardInput(
       PlayerIndex.One,
       <span style="color: #006080;">"You Win"</span>,
       <span style="color: #006080;">"Insert your name"</span>,
       <span style="color: #006080;">""</span>,
       <span style="color: #0000ff;">new</span> AsyncCallback(OnEndShowKeyboardInput),
       <span style="color: #0000ff;">null</span>);</pre>
</div>
<p>With this code you are invoking the Keyboard Task, you need to keep in mind that your application will be deactivated and If you have code there will be executed, once the user finish to type the name and tap on accept button will return back to your application.</p>
<p><a href="http://luisguerrero.net/en/files/2010/07/image1.png" target="_blank"><img class="wlDisabledImage" style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="image" src="http://luisguerrero.net/en/files/2010/07/image_thumb1.png" border="0" alt="image" width="266" height="484" /></a></p>
<div style="line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: consolas, 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;">
<pre style="line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff;">private</span> <span style="color: #0000ff;">void</span> OnEndShowKeyboardInput(IAsyncResult result)
{
    name = Guide.EndShowKeyboardInput(result);
}</pre>
</div>
<p>Here is where you get the string that the user typed.</p>
<p>You can download simple demo showing this functionality from <a href="http://www.luisguerrero.net/downloads/XnaWP7ShowKeyboard.zip">here</a>.</p>
<p>Luis Guerrero.</p>
]]></content:encoded>
			<wfw:commentRss>http://luisguerrero.net/en/2010/07/17/how-to-access-to-keyboard-in-xna-from-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>2237</slash:comments>
		</item>
	</channel>
</rss>

