Is the Microsoft Kinect SDK 1.6 missing the KinectSensorChooser component?

I am currently following this guide

http://channel9.msdn.com/Series/KinectQuickstart/Setting-up-your-Development-Environment

But at about 9:50, he uses the KinectSensorChooser component, which is no longer available in the latest version of the SDK 1.6, because I read the Microsoft SDK history log, which states

"Weve taken KinectSensorChooser, previously part of WpfViewers, and divided the logic and interface into two different classes: KinectSensorChooser and KinectSensorChooserUI in Microsoft.Kinect.Toolkit.dll. KinectSensorChooser can be used in scripts other than the WPF user interface .

Source: http://www.windows7download.com/win7-kinect-sdk/history-lxqvgakz.html

Since Microsoft.Kinect does not include the KinectSensorChooser component, I added the Microsoft.Kinect.Toolkit reuse component, which includes KinectSensorChooser, but the component does not appear in the toolbar, I tried to add it manually by right-clicking on the toolbox and selecting options, then WPF components and then localize it, but it imports as a user interface (KinectSensorChooserUI), and if I drag it onto a form that disappears from the toolbar, I use Visual Studio 2012 Ultimate in Windows 8

+6
source share
1 answer

I have never added a KinectSensorChooserUI control to a toolbar in Visual Studio. The need for this does not really exist.

If you think this is mandatory, I found the message Adding your WPF control to a toolbar , which may be useful. I haven’t tried it myself, so I can’t promise that it will work.

I personally do not use the KinectSensorChooser user interface KinectSensorChooser . Unless you really plan on turning Kinect on / off or switching between multiple Kinect manually, this is not really a big deal. This gives some feedback, but it can be done in other more aesthetically pleasing ways.

To use KinectSensorChooser you just need the following in your main class:

 private readonly KinectSensorChooser _sensorChooser = new KinectSensorChooser(); public MainViewModel() { // other initialization here _sensorChooser.Start(); // more initialization here } 

You now have an active KinectSensorChooser , minus the user interface.

If you want to use the user interface component, do not try to add it to the toolbar and simply follow these steps:

  • Add Toolkit project or link to .dll.
  • Add a namespace to your Xaml so you can reference the controls in your markup. xmlns:kt="clr-namespace:Microsoft.Kinect.Toolkit;assembly=Microsoft.Kinect.Toolkit"
  • Add a control to your visual tree <kt:KinectSensorChooserUI x:Name="SensorChooserUI" />

Your code will declare a namespace, initialize KinectSensorChooser and configure any events you want.

 using Microsoft.Kinect; using Microsoft.Kinect.Toolkit; private readonly KinectSensorChooser _sensorChooser = new KinectSensorChooser(); // somewhere in your constructor, or other init function this.SensorChooserUI.KinectSensorChooser = _sensorChooser; _sensorChooser.Start(); 
+5
source

All Articles