228 Views
I first started playing around with my Kinect at home just to get a feel for what was involved in working with the SDK – I must say that I, like many of you, was amazed, and still am, at how awesomely simple and beautifully designed the API’s in the Kinect NUI framework are. A lot of people have written little Kinect demo’s showing how to create buttons and detect hand location, but I thought I’d try something different. So I set out to mimic some of the Xbox Live's interface elements in WPF.
Since you gave us the warning about your winform/WPF skills I thought I'd give you a quick hint to improve your example:
private void button_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show(string.Format("{0} Clicked", ((Button)sender).Name));
}
// somewhere in your initializer
button1.Click += button_Click;
button2.Click += button_Click;
I have not checked that code for syntax/other errors, but you get the gist of it I'm sure.
Feel free to check it out and let me know your thoughts.
Doug
I plan on doing some more posts over time, so would be good to know any issues you are having.