private void Window_Loaded(object sender, RoutedEventArgs e) { SetupKinect(); exampleController = new SkeletonController(this); yourController1 = new CustomController1(this); yourController2 = new CustomController2(this); currentController = exampleController; InitTargets(); i = 0; }