KinectStatusNotifier is not a self-executable, it generates an assemblies “KinectStatusNotifier.dll” which can be used with Kinect based application.   NotifyIcon is utility forms System.Windows.Forms which can be used invoke the default notification from the system tray. By default, WPF application does not have the Notify Icon, so we are going to create a wrapper around System.Windows.Forms.NotifyIcon so that we can easily invoke it from WPF application.

How to use it ?

1. Add the “KinectStatusNotifier.dll” as reference assembly to the Kinect for Windows Application. Or you can install it using Nuget Package

2. Add the below namespaces in the application

using KinectStatusNotifier;

3 Instantiate a new object for StatusNotifier class as shown below

private StatusNotifier notifier = new StatusNotifier();

2. Assign the KinectSensor.KinectSensors collection reference to notifer.Sensors

this.notifier.Sensors = KinectSensor.KinectSensors;
Now, whenever there is change in status change, you can see the notification with the current Status in System tray icon.

You can set the AutoNotification to false, which will stop the automatic notification in system tray from StatusNotifer and invoke the notify tray icon explicitly when there is a status change by handling StatusChanged event handler in your application itself.

You can also handle it both the places, but can notify status in tray icon from a single place.

Last edited Aug 8, 2013 at 12:12 PM by abhijan, version 2


No comments yet.