<?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>Designer Silverlight &#187; multipoint</title>
	<atom:link href="http://www.designersilverlight.com/category/multipoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designersilverlight.com</link>
	<description>Matthias Shapiro's Silverlight &#38; WPF Blog - Because Developers Get All The Good Blogs</description>
	<lastBuildDate>Thu, 26 Jan 2012 06:45:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>WPF Wii Binding Properties: Infrared Data</title>
		<link>http://www.designersilverlight.com/2008/03/10/wpf-wii-binding-properties-infrared-data/</link>
		<comments>http://www.designersilverlight.com/2008/03/10/wpf-wii-binding-properties-infrared-data/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 15:32:15 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Binding]]></category>
		<category><![CDATA[multipoint]]></category>
		<category><![CDATA[Wii]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[WPF Wii Binding Library]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/03/10/wpf-wii-binding-properties-infrared-data/</guid>
		<description><![CDATA[This is an extension of my previous post, WPF Wiimote Library (Now With Project Files!), which has links to the WPF Wiimote Binding Library project files as well as some information vital to getting you started in connecting your application to the Wiimote. And now for the IR properties: The Wiimote can track up to 4 [...]]]></description>
			<content:encoded><![CDATA[<p>This is an extension of my previous post, <a rel="bookmark" href="http://www.designersilverlight.com/2008/03/07/wpf-wiimote-library-now-with-project-files/" title="Permanent Link to WPF Wiimote Library (Now With Project Files!)">WPF Wiimote Library (Now With Project Files!)</a>, which has links to the WPF Wiimote Binding Library project files as well as some information vital to getting you started in connecting your application to the Wiimote.</p>
<p>And now for the IR properties:</p>
<p>The Wiimote can track up to 4 infrared (IR) LEDs at a time. If I were a programmer, I would have created an IR LED enum with the following properties as part of each IR LED. But since I&#8217;m not, these properties can be accessed with the following convention: IR[#][propertyName]. Each IR LED has the following properties:</p>
<h2>IR[#]RawPosition</h2>
<p><strong>Type:</strong> Point</p>
<p><strong>Summary:</strong> The IR camera has a X,Y resolution of 1024, 768. This property will give you the raw X,Y position that the Wiimote is tracking this LED at.</p>
<p><strong>Binding Usage Example:</strong></p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid </font><font color="#ff0000">Canvas.Left</font>=&#8221;<font color="#b8860b">{Binding Source={StaticResource WiiData}, Path=&#8221;IR1RawPosition.X, Mode=OneWay}</font>&#8221;<br />
<font color="#ff0000">Canvas.Top</font>=&#8221;<font color="#b8860b">{Binding Source={StaticResource WiiData}, Path=&#8221;IR1RawPosition.Y, Mode=OneWay}</font>&#8221; <font color="#0000ff">/&gt;</font></p>
<p><strong>Additional Info:</strong> This will work best if your Canvas is the exact dimensions of the Wiimote camera (1024, 768). These properties are automatically converted to take into account the IsMultiPoint setting (described in the Miscellaneous Properties (coming soon)).</p>
<h2>IR[#]Position</h2>
<p><strong>Type:</strong> Point</p>
<p><strong>Summary:</strong> This is the X,Y ratio of the position of your IR LED. The best way to use this is in a multi-binding with the width and height of your target Canvas. Fortunately for you, I&#8217;ve added a converter that will help with this. Simply add the following code in your resources:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Wii:VariableCanvasPointConverter</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">VariableCanvasConverter</font>&#8221; <font color="#0000ff">/&gt;</font></p>
<p>And follow the binding example below.</p>
<p><strong>Binding Usage Example:</strong></p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">   &lt;</font><font color="#800000">Canvas.Left</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">MultiBinding</font> <font color="#ff0000">Converter</font>=&#8221;<font color="#b8860b">{StaticResource VariableCanvasConverter}</font>&#8220;<font color="#0000ff">&gt;</font><br />
<font color="#0000ff">         &lt;</font><font color="#800000">Binding</font> <font color="#ff0000">Source</font>=&#8221;<font color="#b8860b">{StaticResource WiiData}</font>&#8221; <font color="#ff0000">Path</font>=&#8221;<font color="#0000ff">IR1Position.X</font>&#8221; <font color="#ff0000">Mode</font>=&#8221;<font color="#0000ff">OneWay</font>&#8221; <font color="#0000ff">/&gt;<br />
</font><font color="#0000ff">         &lt;</font><font color="#800000">Binding</font> <font color="#ff0000">ElementName</font>=&#8221;<font color="#0000ff">MyCanvas</font>&#8221; <font color="#ff0000">Path</font>=&#8221;<font color="#0000ff">ActualWidth</font>&#8221; <font color="#ff0000">Mode</font>=&#8221;<font color="#0000ff">Default</font>&#8221; <font color="#0000ff">/&gt;<br />
</font><font color="#0000ff">      &lt;/</font><font color="#800000">MultiBinding</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">   &lt;/</font><font color="#800000">Canvas.Left</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">   &lt;</font><font color="#800000">Canvas.Top</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">      &lt;</font><font color="#800000">MultiBinding</font> <font color="#ff0000">Converter</font>=&#8221;<font color="#b8860b">{StaticResource VariableCanvasConverter}</font>&#8220;<font color="#0000ff">&gt;</font><br />
<font color="#0000ff">         &lt;</font><font color="#800000">Binding</font> <font color="#ff0000">Source</font>=&#8221;<font color="#b8860b">{StaticResource WiiData}</font>&#8221; <font color="#ff0000">Path</font>=&#8221;<font color="#0000ff">IR1Position.Y</font>&#8221; <font color="#ff0000">Mode</font>=&#8221;<font color="#0000ff">OneWay</font>&#8221; <font color="#0000ff">/&gt;<br />
</font><font color="#0000ff">         &lt;</font><font color="#800000">Binding</font> <font color="#ff0000">ElementName</font>=&#8221;<font color="#0000ff">MyCanvas</font>&#8221; <font color="#ff0000">Path</font>=&#8221;<font color="#0000ff">ActualHeight</font>&#8221; <font color="#ff0000">Mode</font>=&#8221;<font color="#0000ff">Default</font>&#8221; <font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">      &lt;/</font><font color="#800000">MultiBinding</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">   &lt;/</font><font color="#800000">Canvas.Top</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Grid</font><font color="#0000ff">&gt;</font></p>
<p><strong>Additional Info:</strong> These properties are automatically converted to take into account the IsMultiPoint setting (described in the Miscellaneous Properties (coming soon)).</p>
<h2>IR[#]Found</h2>
<p><strong>Type:</strong> boolean</p>
<p><strong>Summary:</strong> This is a property that is &#8220;true&#8221; if the Wiimote can see the target LED and &#8220;false&#8221; if it cannot.</p>
<p><strong>Binding Usage Example:</strong></p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid</font> <font color="#ff0000">IsEnabled</font>=&#8221;<font color="#b8860b">{Binding Source={StaticResource WiiData}, Path=IR2Found, Mode=OneWay}</font>&#8221; <font color="#0000ff">/&gt;</font></p>
<p><strong>Additional Info:</strong><span>  </span>This property is also available for the midpoint between the first and second infrared light (MidPointFound) and for the target point (TargetFound) which displays a calculated position of where the Wiimote is being pointed.</p>
<h2>IR[#]Size</h2>
<p><strong>Type:</strong> double</p>
<p><strong>Summary:</strong> The Wiimote naturally picks up the size of the LED it is tracking. To get larger sizes<span>  </span>(which translates into better reliability) use a small cluster of LEDs (three should do the trick) rather than a single one.</p>
<p><strong>Binding Usage Example:</strong></p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid</font> <font color="#ff0000">Width</font>=&#8221;<font color="#b8860b">{Binding Source={StaticResource WiiData}, Path=IR1Size, Mode=OneWay}</font>&#8221; <font color="#0000ff">/&gt;</font></p>
<h2>IsIR[#]Visible</h2>
<p><strong>Type:</strong> bool</p>
<p><strong>Summary:</strong> This item is meant for two way binding. If you want a way to programmatically choose whether or not to show the item that is bound to your IR interface, use this property. It is most useful when used in conjunction with the BoolToVisibility Converter, which can be used by placing this XAML in your resources:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">BooleanToVisibilityConverter</font> <font color="#ff0000">x:Key</font>=&#8221;<font color="#0000ff">boolToVis</font>&#8221; <font color="#0000ff">/&gt;</font></p>
<p><strong>Binding Usage Example:</strong></p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Grid</font> <font color="#ff0000">Visibility</font>=&#8221;<font color="#b8860b">{Binding Source={StaticResource WiiData}, Path=IsIR3Visible, Mode=OneWay, Converter={StaticResource boolToVis}</font>&#8220;<font color="#0000ff">/&gt;</font></p>
<p><font color="#0000ff">&lt;</font><font color="#800000">CheckBox</font> <font color="#ff0000">IsChecked</font>=&#8221;<font color="#b8860b">{Binding Source={StaticResource WiiData}, Path=IsIR3Visible, Mode=TwoWay}</font>&#8220;<font color="#0000ff">/&gt;</font></p>
<p><strong>Additional Info:</strong><span>  </span>This is a great property to attach to a checkbox (as seen above) to allow user control over which items are to be shown.</p>
<p>In addition to the infrared lights, the WPF Wii library is set up to display two calculated points as well:</p>
<ul>
<li>A midpoint between IR1 and IR2</li>
<li>A target point (based on the midpoint) which indicates where the Wiimote is being pointed.</li>
</ul>
<p>These two calculated points still have the position properties listed above (<strong>TargetRawPosition, MidPoint RawPosition, TargetPosition, MidPointPosition</strong>) as well as the visibility booleans (<strong>IsTargetVisible</strong> and <strong>IsMidPointVisible</strong>) and the &#8220;found&#8221; boolean properties (<strong>MidPointFound</strong> and <strong>IsTargetPossible</strong>).</p>
<p>Of course, you can also play around with the items in Intellisense is also a great way to discover all the available properties.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/03/10/wpf-wii-binding-properties-infrared-data/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Wii+Binding+Properties%3A+Infrared+Data+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D185" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Wii+Binding+Properties%3A+Infrared+Data+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D185" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/03/10/wpf-wii-binding-properties-infrared-data/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WPF Wiimote Library (Now With Project Files!)</title>
		<link>http://www.designersilverlight.com/2008/03/07/wpf-wiimote-library-now-with-project-files/</link>
		<comments>http://www.designersilverlight.com/2008/03/07/wpf-wiimote-library-now-with-project-files/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 15:36:24 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[multipoint]]></category>
		<category><![CDATA[Wii]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[databinding]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/03/07/wpf-wiimote-library-now-with-project-files/</guid>
		<description><![CDATA[Now that we&#8217;ve successfully demoed the Wiimote visualizer in the Open Space at MIX 08 and shown off what we can do at the Show Off event, I need to be a responsible blogger and put the project up&#8230; files and all. I have, with Brian Peek&#8217;s permission, packaged his managed library in here as [...]]]></description>
			<content:encoded><![CDATA[<p>Now that we&#8217;ve successfully demoed the Wiimote visualizer in the Open Space at MIX 08 and shown off what we can do at the Show Off event, I need to be a responsible blogger and put the project up&#8230; files and all. I have, with Brian Peek&#8217;s permission, packaged his managed library in here as well. Please read and respect his licencing agreements.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/03/wpf_wii_binding_library_dll_03_07_08.zip" title="WPF Wii Binding Library DLLs">WPF Wii Binding Library (dlls only) </a></p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/03/wpf_wii_binding_library_src_03_07_08.zip" title="WPF Wii Binding Library Source">WPF Wii Binding Library (source)</a></p>
<p> There are really two parts to the WPF Wiimote Visualizer. The first part is the WPF Wiimote Binding Library, which we&#8217;ll cover in this post (or at least make this post the hub of that information). The second part is the Visualizer program itself, which is basically just the WPF Wiimote Library bound to a bunch of XAML elements.</p>
<p>The WPF Wiimote Binding Library will allow simple binding between your Wiimote and your WPF application (I&#8217;ve got <a href="http://www.designersilverlight.com/2008/01/31/wpf-wii-multi-point-tutorials-part-2-writing-a-code-less-wiimote-program/">a whole post on that here</a>). But let me extrapolate a little on what the library has to offer. I&#8217;ve seperated out the data into different posts to make it a little more digestible.</p>
<p><a href="http://www.designersilverlight.com/2008/03/10/wpf-wii-binding-properties-infrared-data/">Infrared Data </a></p>
<p>Button Data (coming soon)</p>
<p>Misc Data (Rumble, Battery, Accelerometers) (coming soon)</p>
<p>Nunchuk Data (coming soon)</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/03/07/wpf-wiimote-library-now-with-project-files/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Wiimote+Library+%28Now+With+Project+Files%21%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D182" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Wiimote+Library+%28Now+With+Project+Files%21%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D182" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/03/07/wpf-wiimote-library-now-with-project-files/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>The Trials and Travails of the Infrared Multipoint</title>
		<link>http://www.designersilverlight.com/2008/02/29/the-trials-and-travails-of-the-infrared-multipoint/</link>
		<comments>http://www.designersilverlight.com/2008/02/29/the-trials-and-travails-of-the-infrared-multipoint/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 15:55:15 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[multipoint]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[infrared]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/02/29/the-trials-and-travails-of-the-infrared-multipoint/</guid>
		<description><![CDATA[OK, I&#8217;ve been waiting to post more on the Wii multipoint for a while, but I&#8217;m been waiting to get some kind of mobile infrared light system working. If you&#8217;ve watched Johnny Lee&#8217;s video, you would get the impression that it&#8217;s a 1-2-3 easy a cake thing to do.  You would be so wrong.  So, [...]]]></description>
			<content:encoded><![CDATA[<p>OK, I&#8217;ve been waiting to post more on the Wii multipoint for a while, but I&#8217;m been waiting to get some kind of mobile infrared light system working. If you&#8217;ve watched Johnny Lee&#8217;s video, you would get the impression that it&#8217;s a 1-2-3 easy a cake thing to do.</p>
<p> You would be so wrong.</p>
<p> So, first I tried to duplicate his infrared array. He is using 100 IR LEDs to project a flood of IR light that is then reflected back to the Wiimote screen using reflective tape.</p>
<p><strong>Reflective Tape:</strong> Is not easy to find. At all. Go ahead and try it. 3M sells reflective tape, but none of the hardware stores in Salt Lake City had any. As a plus, they said they could have it on hand within two weeks.</p>
<p>Ebay is an option if (again) you don&#8217;t mind waiting two weeks to get something. But there are many kinds of reflective tape. Which one works best? We&#8217;ll get to that part.</p>
<p><strong>Infrared Array:</strong> Johnny Lee gives no specs on his IR array, so I can&#8217;t speak to its efficacy. I built one with 96 high output IR LED&#8217;s. In addition to the LED&#8217;s (which are $2 per LED at Radio Shack and closer to 30 cents per LED at <a href="http://www.mouser.com/">Mouser</a>), I had to get a breadboard, batteries, a voltimiter, and some resistors.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/02/irarray.jpg" alt="IRArray" /></p>
<p>In the end, it didn&#8217;t work. The LEDs all lit up just fine, but they didn&#8217;t output anywhere near enough light to give a healthy reflection. Was this the light or the relfective tape I was using? We&#8217;ll get to that part.</p>
<p><strong>Infrared Spotlight:</strong> I initially assumed it was the light. So I got my hands on a 1,000,000 candle power IR spotlight to solve that problem. Turned it on and&#8230; nothing. The Wiimote picked up the spotlight shining on my shirt, but it wouldn&#8217;t pick up the reflection off the tape. So is this a problem with the light or with the tape?</p>
<p> I have no idea, but I can tell you that the tape is borderline useless with everything I&#8217;ve tried.</p>
<p>Maybe I&#8217;m using low power IR LED&#8217;s (1.3 volt, 100mA) or maybe I&#8217;m using the wrong kind of reflective tape (I tried both engineering grade and retroreflective daybright&#8230; whatever that means), but I have had zero success replicating Johnny Lee&#8217;s design.</p>
<p>My next step is going to be an attempt to mount IR LED&#8217;s directly into a pair of gloves, which is how the Cynergy demo was done. This was the solutions that I finally got that working&#8230; as you&#8217;ll see in some videos over the next couple days.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/02/29/the-trials-and-travails-of-the-infrared-multipoint/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=The+Trials+and+Travails+of+the+Infrared+Multipoint+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D170" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=The+Trials+and+Travails+of+the+Infrared+Multipoint+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D170" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/02/29/the-trials-and-travails-of-the-infrared-multipoint/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WPF Wii Multi-Point Tutorials, Part 2: Writing a Code-less Wiimote Program</title>
		<link>http://www.designersilverlight.com/2008/01/31/wpf-wii-multi-point-tutorials-part-2-writing-a-code-less-wiimote-program/</link>
		<comments>http://www.designersilverlight.com/2008/01/31/wpf-wii-multi-point-tutorials-part-2-writing-a-code-less-wiimote-program/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 09:12:24 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Advanced Tutorial]]></category>
		<category><![CDATA[How To...]]></category>
		<category><![CDATA[multipoint]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XAML]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[Data Binding]]></category>
		<category><![CDATA[INotifyPropertyChanged]]></category>
		<category><![CDATA[multi-point]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/01/31/wpf-wii-multi-point-tutorials-part-2-writing-a-code-less-wiimote-program/</guid>
		<description><![CDATA[ OK, I hope no one is using my last post as an example of what you should be doing when interfacing the Wiimote with WPF. Because it was completely hack-tastic.  Instead, use my new WPF/Wii library. It uses the WPF INotifyPropertyChanged interface to act as an interface so that we can bind the Wiimote data [...]]]></description>
			<content:encoded><![CDATA[<p> OK, I hope no one is using my last post as an example of what you should be doing when interfacing the Wiimote with WPF. Because it was completely hack-tastic.</p>
<p> Instead, use my <a href="http://www.designersilverlight.com/wp-content/uploads/2008/01/wpf_wii_binding_library.zip" title="WPF_Wii_Binding_Library">new WPF/Wii library</a>. It uses the WPF INotifyPropertyChanged interface to act as an interface so that we can bind the Wiimote data directly to the XAML. More on that in a little bit, but first&#8230;</p>
<p>In this post, we&#8217;ll walk through creating a basic multi-point capable app that uses the Wiimote as an input device. What is really unique about this post is the fact that we&#8217;re going to do this in a way that requires absolutely no code whatsoever on your part.</p>
<p>That&#8217;s right. No code. At all. Zero knowledge of C# required.</p>
<p><span id="more-99"></span>First, download the &#8220;<a href="http://www.designersilverlight.com/wp-content/uploads/2008/01/wpf_wii_binding_library.zip" title="WPF_Wii_Binding_Library">WPF_Wii_Binding_Library</a>&#8221; and the &#8220;<a href="http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx">WiimoteLib</a>&#8221; dlls, unzip them and put them in the same folder (somewhere you can find them).</p>
<p>Open up Blend or Visual Studio 2008 and start a new application. (Visual Studio 2008 is reccomended for this tutorial.)</p>
<p>Now, head right on over to your <strong>&#8220;Project&#8221;</strong> tab or <strong>&#8220;Solution Explorer&#8221;</strong> and right click on the <strong>&#8220;References&#8221;</strong> folder and click <strong>&#8220;Add Reference&#8221;</strong>.</p>
<p>Blend</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/references.png" alt="BlendReferences" /></p>
<p>VS 2008</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/vsreferences.png" alt="VS2008References" /></p>
<p>Browse for the reference &#8220;WPF_Wii_Binding_Library&#8221; (the one you just downloaded) and click &#8220;Open&#8221;.</p>
<p>In your main composition, add a &#8220;Canvas&#8221;.</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Canvas</font><font color="#0000ff">&gt;</font><br />
<font color="#0000ff">&lt;/</font><font color="#800000">Canvas</font><font color="#0000ff">&gt;</font></p>
<p>Draw three ellipses and give them three different colors.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/ellipses.png" alt="Ellipse" /></p>
<p>Define the following XML namespace Window:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Window</font> &#8230;<br />
 <font color="#ff0000">xmlns</font><font color="#0000ff">:</font><font color="#ff0000">Wii</font>=&#8221;<font color="#0000ff">clr-namespace:WPF_Wii_Binding_Library;assembly=WPF_Wii_Binding_Library</font>&#8220;<font color="#0000ff">&gt;</font></p>
<p>In your Resources, add the following resources (you can just copy this code if you want):</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Wii</font><font color="#0000ff">:</font><font color="#800000">WPFWii <font color="#ff0000">x</font></font><font color="#0000ff">:</font><font color="#ff0000">Key</font>=&#8221;<font color="#0000ff">WiiData</font>&#8221; <font color="#ff0000">IsMultiPointMode</font>=&#8221;<font color="#0000ff">True</font>&#8220;  <font color="#0000ff">/&gt;</font><br />
<font color="#0000ff">&lt;</font><font color="#800000">BooleanToVisibilityConverter</font> <font color="#ff0000">x</font><font color="#0000ff">:</font><font color="#ff0000">Key</font>=&#8221;<font color="#0000ff">boolToVis</font>&#8221; <font color="#0000ff">/&gt;</font></p>
<p>Note: If you&#8217;re using anything less than <a href="http://www.microsoft.com/Downloads/details.aspx?familyid=65177E23-C116-475A-9057-5A5071A379F6&amp;displaylang=en">Blend 2 December Preview</a>, I can make no guarantees that this solution won&#8217;t throw a fit. Even with the B2DP, it is still having issues. The best way to do this is really through Visual Studio 2008. But if you don&#8217;t mind just typing all your XAML, Blend will still compile fine.</p>
<p>Find your first Ellipse in the XAML. Add the following Visibility property:</p>
<p><font color="#ff0000">Visibility</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=IR1Found, Converter={StaticResource boolToVis}}</font>&#8221;</p>
<p>What this is doing is connecting to the Wiimote and checking to see if it can see your first infrared LED. I suggest using the sensor bar that comes with the Wii for the time being.  If it can see the LED, your ellipse will be visible. If it can&#8217;t, it won&#8217;t.</p>
<p>It is now time for us to make the magic. Replace whatever &#8220;Canvas.Left&#8221; and &#8220;Canvas.Top&#8221; properties so that your Ellipse looks like the following:</p>
<p><font color="#0000ff">&lt;</font><font color="#800000">Ellipse </font><font color="#800000"><font color="#ff0000">Width<font color="#0000ff">=&#8221;30&#8243;</font><font color="#ff0000"><br />
      Height</font><font color="#0000ff">=&#8221;30&#8243;</font><font color="#ff0000"><br />
      Fill</font><font color="#0000ff">=&#8221;#FF0045FF&#8221;</font><font color="#ff0000"><br />
      </font></font></font><font color="#800000"><font color="#ff0000"><font color="#ff0000">Stroke</font><font color="#0000ff">=&#8221;#FF000000&#8243;</font></font></font><font color="#800000"><font color="#ff0000"><br />
      </font></font><font color="#ff0000">Visibility</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=IR1Found, Converter={StaticResource boolToVis}}</font>&#8221;<br />
      <font color="#ff0000">Canvas.Left</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=IR1Position.X, Mode=OneWay}</font>&#8221;<br />
      <font color="#ff0000">Canvas.Top</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=IR1Position.Y, Mode=OneWay}</font>&#8221; /&gt;</p>
<p>We&#8217;re binding that ellipse to the X,Y position the Wiimote has tracked the first infrared LED. Let&#8217;s do the same with our second infrared LED and the midpoint between the two LEDs.</p>
<p>LED number 2:</p>
<p><font color="#ff0000">Visibility</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=IR2Found, Converter={StaticResource boolToVis}}</font>&#8221;<br />
<font color="#ff0000">Canvas.Left</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=IR2Position.X, Mode=OneWay}</font>&#8221;<br />
<font color="#ff0000">Canvas.Top</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=IR2Position.Y, Mode=OneWay}</font>&#8221;</p>
<p>Mid point:</p>
<p><font color="#ff0000">Visibility</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=MidPointFound, Converter={StaticResource boolToVis}}</font>&#8221;<br />
<font color="#ff0000">Canvas.Left</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=MidPointPosition.X, Mode=OneWay}</font>&#8221;<br />
<font color="#ff0000">Canvas.Top</font>=&#8221;<font color="#cc9436">{Binding Source={StaticResource WiiData}, Path=MidPointPosition.Y, Mode=OneWay}</font>&#8221;</p>
<p>Guess what?</p>
<p>You&#8217;re done. That&#8217;s all you need.  Just make sure your Wiimote is connected to your computer and you&#8217;re ready to rock and roll. (Need help with that part? <a href="http://www.designersilverlight.com/2008/01/28/wpf-multi-point-tutorials-part-1-connecting-the-wiimote-controller/">Check here.</a>)</p>
<p>You&#8217;ve just created a Wiimote application with 0 (zero) lines of custom code and (depending on your formatting) less than 20 lines of XAML markup.</p>
<p>The next tutorial may take a week or more to make since I need to wait for my infrared lights and circuits to come in in order to build an infrared array. (Don&#8217;t worry, I&#8217;ll be posting a tutorial on how to build that infrared array. That tutorial will assume that you have never touched a circuit in your life.)</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/01/31/wpf-wii-multi-point-tutorials-part-2-writing-a-code-less-wiimote-program/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Wii+Multi-Point+Tutorials%2C+Part+2%3A+Writing+a+Code-less+Wiimote+Program+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D99" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Wii+Multi-Point+Tutorials%2C+Part+2%3A+Writing+a+Code-less+Wiimote+Program+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D99" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/01/31/wpf-wii-multi-point-tutorials-part-2-writing-a-code-less-wiimote-program/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>WPF Multi-Point Tutorials, Part 1.5: WPF Visualization of Wii Data</title>
		<link>http://www.designersilverlight.com/2008/01/29/wpf-multi-point-tutorials-part-15-wpf-visualization-of-wii-data/</link>
		<comments>http://www.designersilverlight.com/2008/01/29/wpf-multi-point-tutorials-part-15-wpf-visualization-of-wii-data/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 15:01:52 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[multipoint]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[visualization]]></category>
		<category><![CDATA[Wii]]></category>
		<category><![CDATA[Wiimote]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/01/29/wpf-multi-point-tutorials-part-15-wpf-visualization-of-wii-data/</guid>
		<description><![CDATA[Download WPF Wii Data Visualizer (App only, 355K) Download WPF Wii Data Visualizer (Visual Studio 2008 Source, 676K) Warning: The project will not run if your Wii controller isn&#8217;t connected to your computer. Using the WPF Wii Data Visualizer (Video) OK, now that we&#8217;ve gotten our Wii Controllers all hooked up to our computers, it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.designersilverlight.com/wp-content/uploads/2008/01/wpf_wii_visualizer_app_only.zip" title="WPF_Wii_Visualizer_App_Only">Download WPF Wii Data Visualizer (App only, 355K)</a><br />
<a href="http://www.designersilverlight.com/wp-content/uploads/2008/01/wpf_wii_data_visualizer_source.zip" title="SourceVisualizer">Download WPF Wii Data Visualizer (Visual Studio 2008 Source, 676K)</a></p>
<p><strong>Warning:</strong> The project will not run if your Wii controller isn&#8217;t connected to your computer.</p>
<p>Using the WPF Wii Data Visualizer (Video)</p>
<p><object width="425" height="373"><param name="movie" value="http://www.youtube.com/v/bgLBcyREWCQ&#038;rel=1&#038;border=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/bgLBcyREWCQ&#038;rel=1&#038;border=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="373"></embed></object></p>
<p>OK, now that <a href="http://www.designersilverlight.com/2008/01/28/wpf-multi-point-tutorials-part-1-connecting-the-wiimote-controller/">we&#8217;ve gotten our Wii Controllers all hooked up to our computers</a>, it&#8217;s time to take a look at the data we&#8217;re getting from it.</p>
<p>Over the weekend, I pieced together a little application that will help us visualize the incoming Wiimote data in a way that would help understand the raw data points a little better as well as help out as we head toward our ultimate goal of multi-point WPF application development. This is what I came up with.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/wpfwiivisualizer.png" alt="WPFWiiDataVisualizer" /></p>
<p>Disclaimer: The source code at this point is a mess. While the interface is all done in XAML and is very WPF, the code-behind is a hacked together mish-mash. I will at some point go back and restructure the code-behind to take advantage of the INotifyPropertyChanged interface. When I do that, I&#8217;ll post on it and we&#8217;ll see another example of why WPF is so freaking cool.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/01/29/wpf-multi-point-tutorials-part-15-wpf-visualization-of-wii-data/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Multi-Point+Tutorials%2C+Part+1.5%3A+WPF+Visualization+of+Wii+Data+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D103" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Multi-Point+Tutorials%2C+Part+1.5%3A+WPF+Visualization+of+Wii+Data+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D103" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/01/29/wpf-multi-point-tutorials-part-15-wpf-visualization-of-wii-data/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>WPF Multi-Point Tutorials, Part 1: Connecting the Wiimote Controller</title>
		<link>http://www.designersilverlight.com/2008/01/28/wpf-multi-point-tutorials-part-1-connecting-the-wiimote-controller/</link>
		<comments>http://www.designersilverlight.com/2008/01/28/wpf-multi-point-tutorials-part-1-connecting-the-wiimote-controller/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 06:51:51 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[How To...]]></category>
		<category><![CDATA[multipoint]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[Brian Peek]]></category>
		<category><![CDATA[Rick Barraza]]></category>
		<category><![CDATA[Wii]]></category>
		<category><![CDATA[Wiimote]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2008/01/28/wpf-multi-point-tutorials-part-1-connecting-the-wiimote-controller/</guid>
		<description><![CDATA[OK, so I&#8217;ve taken note of multi-point WPF a couple times now (both times were in regards to Rick Barraza&#8217;s Cynergy demo) and I started noticing that people are really interested in this. So I decided to take some time to create a couple tutorials on creating multi-point interfaces in WPF. A point of note: [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so I&#8217;ve taken note of multi-point WPF a couple times now (both times were in regards to <a href="http://www.designersilverlight.com/2008/01/03/wpf-multipoint-and-the-wii/">Rick Barraza&#8217;s Cynergy demo</a>) and I started noticing that people are really interested in this. So I decided to take some time to create a couple tutorials on creating multi-point interfaces in WPF.</p>
<p>A point of note: I am not a programmer. I am a designer. This means that whatever code I post will probably be a mess. But it also means that if I can make something work in WPF, anyone can.</p>
<p>The first question we need to address is how to pull multi-point interaction data into your system. You could, of course, <a href="http://www.engadget.com/2008/01/27/lumins-multitouch-display-does-uh-multi-touch">buy one of these</a>. I don&#8217;t have that kind of money, so I decided to try my hand at the poor man&#8217;s multi-point: the ever useful Wiimote controller for the Nintendo Wii.</p>
<p>In this post, we&#8217;ll go over how exactly to connect your Wii controller to your computer via Bluetooth. (I&#8217;m using Vista. Could be different for XP, but I haven&#8217;t tried.)</p>
<p>First, open up your Control Panel and double click on <strong>&#8220;Bluetooth Devices&#8221;</strong></p>
<p><span id="more-90"></span></p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/controlpanelbluetooth.png" alt="BluetoothControlPanel" /></p>
<p>That will bring up your Bluetooth Devices Window. Before we start the Bluetooth discovery process, I want to take note of something. While connecting the Wiimote to your computer may seem like it should be a science, it has in my experience been more of an art. One of the things that I&#8217;ve found helps my art is to go to the <strong>&#8220;Options&#8221;</strong> tab and check the <strong>&#8220;Allow Bluetooth devices to find this computer&#8221;</strong> box:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/bluetoothdiscovery.png" alt="BTDiscovery" /></p>
<p>Yes, I am well aware that this is poor security. But it works for me.</p>
<p>Now lets go back to the <strong>&#8220;Devices&#8221;</strong> tab and click <strong>&#8220;Add…&#8221; </strong>at the bottom and you&#8217;ll get started with the <strong>&#8220;Add Bluetooth Device Wizard&#8221;</strong>.</p>
<p>Check <strong>&#8220;My device is set up and ready to be found.&#8221;</strong></p>
<p>Now, before you click <strong>&#8220;Next&#8221;</strong>, make sure your Wii is either off or out of range of your Wii controller. (If you don&#8217;t, it Wii will take control of the Bluetooth signal and your computer won&#8217;t be able to find it.)<br />
 Press the <strong>&#8220;1&#8243;</strong> and <strong>&#8220;2&#8243; </strong>buttons simultaneously on your Wii controller. The four lights at the bottom should start flashing in unison.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/12buttons.png" alt="12Buttons" /></p>
<p>Now, quickly, press <strong>&#8220;Next&#8221;</strong>.</p>
<p>After searching for a little while, you should see <strong>&#8220;Nintendo RVL-CNT-01&#8243;</strong> or something similar. Click on it and press <strong>&#8220;Next&#8221;</strong>.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/newdevicepic.png" alt="NewDevice" /></p>
<p>In the passkey section, select <strong>&#8220;Don’t use a passkey&#8221;</strong>.</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/dontusepasskey.png" alt="NoPassKey" /></p>
<p>At this point, the flashing lights on your Wiimote will stop flashing. As far as I can surmise, this means that your Wiimote is not longer broadcasting. So press the <strong>&#8220;1&#8243;</strong> and <strong>&#8220;2&#8243;</strong> buttons again and hit <strong>&#8220;Next&#8221;</strong></p>
<p>You should get the following message:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/connectionpic1.png" alt="Connection1" /></p>
<p>Followed by:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/connectionpic2.png" alt="Connection 2" /></p>
<p>Followed by:</p>
<p><img src="http://www.designersilverlight.com/wp-content/uploads/2008/01/connectionpic3.png" alt="Connection3" /></p>
<p>When you see this, you should be golden. Once the computer grabs a hold of the Wiimote Bluetooth signal, it holds on with a vice-like grip. Click on <strong>&#8220;Finish&#8221;</strong> in the wizard and close the Bluetooth window.</p>
<p>As a way of double checking your connection status, open up a data visualization application for the Wii controller. My recommendation is my own recently semi-completed WPF Wii Data Visualizer.</p>
<p>Another (more complete) option is <a href="http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx">Brian Peek&#8217;s Managed Library for Nintendo&#8217;s Wiimote</a>. We&#8217;ll come back to Brian&#8217;s work again and again as it is his library that makes everything here possible.</p>
<p>Meanwhile, if this is working for you, check out my next step to WPF multi-point happiness in which we take a closer look at some of the data that comes out of the Wiimote.</p>
<p>A note of encouragement: If your Wii doesn&#8217;t work the first time, just try again. My first time, I had to try several times before I could get anything out of my hardware.</p>
<p>As a point of note, the &#8220;Wii&#8221; is worst name for a game console. Ever. Period.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2008/01/28/wpf-multi-point-tutorials-part-1-connecting-the-wiimote-controller/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Multi-Point+Tutorials%2C+Part+1%3A+Connecting+the+Wiimote+Controller+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D90" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF+Multi-Point+Tutorials%2C+Part+1%3A+Connecting+the+Wiimote+Controller+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D90" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2008/01/28/wpf-multi-point-tutorials-part-1-connecting-the-wiimote-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

