using Microsoft.Kinect; KinectSensor kinectSensor = KinectSensor.GetDefault(); kinectSensor.Open(); // ...kinect sensor is being used for some time... kinectSensor.Stop();
void OnApplicationQuit() { KinectSensor.KinectSensors.StatusChanged -= KinectSensors_StatusChanged; KinectSensor.KinectSensors.Stop(); }In this example, the stop method is used when the application is quitting. The stop method is called on all the Kinect sensors present in the system. Package Library: Microsoft.Kinect v2.0 (Kinect for Windows SDK 2.0)