private KinectTouchDevice GetDevice(int index)
{
if (!this.touchDevices.ContainsKey(index))
{
this.presentationSource.Dispatcher.Invoke(new Action(() =>
{
this.touchDevices.Add(index, new KinectTouchDevice(index, this.presentationSource));
}));
}
return this.touchDevices[index];
}