You should probably wrap the entire thing in a try-catch since at least here setting the ElevationAngle to often spits out an Exception.
for example
using System;
using Microsoft.Research.Kinect.Nui;
namespace Kinect.Extensions
{
public static class CameraExtensions
{
public static bool TrySetAngle(this Camera camera, int angle)
{
try
{
camera.ElevationAngle = angle;
return true;
}
catch (Exception e)
{
return false;
}
}
}
}
Hope it will give you an idea
Or this Sample Code From CP Will Guide You
Kinect – Getting Started – Become The Incredible Hulk[
^]