Archive for February 2008

The Trials and Travails of the Infrared Multipoint

OK, I’ve been waiting to post more on the Wii multipoint for a while, but I’m been waiting to get some kind of mobile infrared light system working. If you’ve watched Johnny Lee’s video, you would get the impression that it’s a 1-2-3 easy a cake thing to do.

 You would be so wrong.

 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.

Reflective Tape: 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.

Ebay is an option if (again) you don’t mind waiting two weeks to get something. But there are many kinds of reflective tape. Which one works best? We’ll get to that part.

Infrared Array: Johnny Lee gives no specs on his IR array, so I can’t speak to its efficacy. I built one with 96 high output IR LED’s. In addition to the LED’s (which are $2 per LED at Radio Shack and closer to 30 cents per LED at Mouser), I had to get a breadboard, batteries, a voltimiter, and some resistors.

IRArray

In the end, it didn’t work. The LEDs all lit up just fine, but they didn’t output anywhere near enough light to give a healthy reflection. Was this the light or the relfective tape I was using? We’ll get to that part.

Infrared Spotlight: 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… nothing. The Wiimote picked up the spotlight shining on my shirt, but it wouldn’t pick up the reflection off the tape. So is this a problem with the light or with the tape?

 I have no idea, but I can tell you that the tape is borderline useless with everything I’ve tried.

Maybe I’m using low power IR LED’s (1.3 volt, 100mA) or maybe I’m using the wrong kind of reflective tape (I tried both engineering grade and retroreflective daybright… whatever that means), but I have had zero success replicating Johnny Lee’s design.

My next step is going to be an attempt to mount IR LED’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… as you’ll see in some videos over the next couple days.

Special Leap Day Link-O-Rama

My brain is out of town while I’m working on our MIX Show Off Entry. In the meantime, I need to post some links so that I don’t forget them. I suppose you can use them too, if you want:

You’ll notice that there is a little bit of focus on Silverlight 2.0 here… That’s because it’s awesome. Keep watching, I’ll start blogging on it as I get into it more and more.

Triggering Events and Updating Bindings

Sorry for the extended absence… I’m been working myself to the bone on the Veracity submission to the Show Off at MIX08. We’ll have some really kicking stuff to play around with at the Open Space… you should drop by and say hi. I look something like this:

MeAt130

At least I look like that at 1:30 AM.

OK, so I felt the need to pipe up at this ungodly hour with a public service announcement about events and databinding. I just spent a good hour trying to figure out a workaround for this problem. I had a method being called on my “IsVisibleChanged” event. I was planning on take that item and performing some code-behind logic based on the databound Canvas.Left and Canvas.Top properties.

WPF put the smack-down on that action. The data binding wouldn’t update before the event was called. And I couldn’t make it. Not without some kind of Invoke… which, I must admit, scares the ever-loving crap out of me, so I didn’t try… also because I didn’t know how to use it.

My advice if your databinding won’t update? Find some way of going to the data itself. If you’re binding to something in the XAML, you should be able to find the object you’re binding to in the code as well. Just go straight to the source.

Anyone have a better idea or suggestion? I’m totally open to hearing it.

Apple Patents Use Of Fingertips as Interaction Devices

In a development certain to inspire renewed confidence in the company that has shown us technological marvel after marvel, Apple has filed a patent elucidating the innovative use of fingertips to drive interaction between people and electronic devices.

“It’s something we feel that Apple is uniquely positioned to bring to the table, given our overwhelming superiority with all technology… at least as percieved by our more rabid devotees” said Apple CEO Steve Jobs. “This patent will help us corner the market on interactive innovation or, as I like to call it, Appleactive iMacopodovation. TM.”

Under the patent filing, Apple has been granted the exclusive right to develop applications responding to input stemming from the distal phalanges. The company has not been forthcoming with specifics of any application development this may open for them, but the excitement seemed barely containable.

SteveJobsHands

Steve Jobs shows the latest innovation from Apple… fingertips

Continue reading ‘Apple Patents Use Of Fingertips as Interaction Devices’ »

ListView (and ListBox) Performance Issues

I was working on one of my projects today and I noticed that one of our popups displaying search results in a ListBox was having really serious performance problems.  After determining that the problem was, in fact, on the WPF side of things, I was somewhat baffled. I wasn’t doing anything that I could think of that should be pushing the limit of what WPF could do.

 Finally, I went looking online for an answer and discovered a list of possible performance killers for the ListView (and ListBox) on Mark Shurmer’s blog. Chief among his no-no’s:

Embedding the ListView inside a StackPanel

Which is exactly what I was doing.

Why is this a problem? To answer that question, let’s take a look at the ItemsPanel at runtime using Snoop. When I place my ListBox into a Grid, here is what my ItemsPanel looks like:

Continue reading ‘ListView (and ListBox) Performance Issues’ »

WPF Drop-Shadows on The Cheap

One of the questions I get most often from designers and almost never from developers is:

How can I get drop shadows into my application without killing my performance?

 It is, of course, easy as punch and pie to get drop shadows into your application. You can just use the Bitmaps Effects panel in the Appearance section:

 OrdinaryDropShadowing

For the love of God, please do not use the Bitmap Effects in the Appearance section!

If any developers found out that I told you to use BitmapEffects, they would hunt me down and cut off my fingers. This is because, while the Bitmap Effects in WPF are all sorts of cool, they make your computer break down into uncontrollable sobbing. Bitmap Effects hog system resources by requiring software rendering for render-heavy effects. There is no better way to slow down a perfectly good application than to give every other element a drop shadow.

But, what if you really really want to?

Continue reading ‘WPF Drop-Shadows on The Cheap’ »

How Do I Style The ComboBox Items?

This is actually a continuation of my post on getting the ComboBox items to accept text wrapping, so I’ll be working from that point forward. If you’re coming fresh into this, you won’t be missing anything… but that is my explaination for the pictures containing wrapping text.

When last we left our heroes, we has a couple problems. The first was that our items were either black text on a white background and ran together in a very un-designer-y way.

BeginningViewComboStyling

The second was that the selected item background makes your eyes bleed such a horrid blue color you’ll feel like Paul Atreides staring at a stone burner.

Was that a little too geek? My apologies.

Continue reading ‘How Do I Style The ComboBox Items?’ »

The WPF Designers Guide to Styling The ComboBox

 The ComboBox is not the most complex of the WPF applications, but it can be a little tricky, so lets do a general overview post of it before we go into the specifics of how we’re going to make it work.

First of all, if you’re going to test your comboBox design, you should have it hooked up to an ItemsSource. Don’t have one? I have a tutorial in which I walk through attaching an RSS feed to your control. It was originally written for the ListView, but it will work fine for a ComboBox.

To start out… this is your standard ComboBox:

unalteredComboBox

When working on a comboBox, you have a couple of options for the Items inside the ComboBox. If the options never change and are not data-driven, you can just toss come ComboBoxItems into it. Otherwise, you can connect it to some kind of ItemsSource (see the link above).

All of my examples are done with a data-driven ComboBoxes, but you should get the desired results if you run through the tutorials with ComboBoxItems.

First, a little bit about the structure of the comboBox.

Continue reading ‘The WPF Designers Guide to Styling The ComboBox’ »

Looking for Senior .NET 3.5 (WPF, Silverlight) Developers

For those of you who don’t know, I work for Veracity Solutions and we’re currently looking for Senior .NET 3.5 (WPF, Silverlight) developers (in Utah strongly preferred) . You can find the Dice post here).

You can take my word for it, Veracity is a great place to work… great boss who respects your expertise, fun projects, none of the corporate bureaucratic nonsense to deal with. Also (and this is a big bonus for me) we’re not a “all-meetings-all-the-time” company.

Anyway, if you’re interested, apply at Dice or toss Michael Richards an e-mail at:

michael[at]veracitysolutions[dot]com

Making Visual Studio 2008 Only Show XAML

Karl Shifflett points to a wonderful life saver of a feature that I didn’t know existed until now.

With Visual Studio 2008, the project is always trying to load the design view with the XAML view. I get very frustrated by this… if I wanted to see the design view, I would open Blend.

Apparently, if you’re in VS2008, you can go to “Tools -> Options…” in the resulting window, open up the “Text” option and scroll down to “XAML -> Miscellaneous” Check the box that says “Always open docuemnts in full XAML view”

OpenInXAMLView

 Yay.