Archive for the ‘Advanced Tutorial’ Category.

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.

WPF Wii Multi-Point Tutorials, Part 2: Writing a Code-less Wiimote Program

 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 directly to the XAML. More on that in a little bit, but first…

In this post, we’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’re going to do this in a way that requires absolutely no code whatsoever on your part.

That’s right. No code. At all. Zero knowledge of C# required.

Continue reading ‘WPF Wii Multi-Point Tutorials, Part 2: Writing a Code-less Wiimote Program’ »

Embedded ListView Columns (Columns Within Columns)

Please Read: Strangely, when you do a Google search for “wpf” and “listview”, this is one of the top links. This is odd because this particular post is kind of an advanced tutorial. If you’re looking for more general information on styling the wpf listview, check out this post. It is probably much closer to what you’re looking for.

This is a bit of an advanced tutorial. I’m putting it up because I just figured out how to do it and I want to share. You can also download the project files for this tutorial (in zip format… requires .Net 3.5).

Recently, I received from my user experience designers a wireframe that looked something like this:

EmbeddedWireframe

As you can see, there are embedded categories (categories within categories) here. I considered many solutions (hacks), but I found that a deeper understanding of the ListView and how it works would allow me to resolve this issue very simply (and without even touching the code behind). Continue reading ‘Embedded ListView Columns (Columns Within Columns)’ »