void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.SkeletonViewerElement = ((gesture.skeleton)(target));
                return;

            case 2:
                this.GameBoardElement = ((System.Windows.Controls.Canvas)(target));
                return;
            }
            this._contentLoaded = true;
        }
        private static void KinectDeviceChanged(DependencyObject owner, DependencyPropertyChangedEventArgs e)
        {
            skeleton viewer = (skeleton)owner;

            if (e.OldValue != null)
            {
                ((KinectSensor)e.OldValue).SkeletonFrameReady -= viewer.KinectDevice_SkeletonFrameReady;
                viewer._FrameSkeletons = null;
            }

            if (e.NewValue != null)
            {
                viewer.KinectDevice = (KinectSensor)e.NewValue;
                viewer.KinectDevice.SkeletonFrameReady += viewer.KinectDevice_SkeletonFrameReady;
                viewer._FrameSkeletons = new Skeleton[viewer.KinectDevice.SkeletonStream.FrameSkeletonArrayLength];
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.SkeletonViewerElement = ((gesture.skeleton)(target));
                return;

            case 3:
                this.GameBoardElement = ((System.Windows.Controls.Canvas)(target));
                return;

            case 4:
                this.androidDeviceImg = ((System.Windows.Controls.Image)(target));
                return;

            case 5:
                this.kinectDeviceImg = ((System.Windows.Controls.Image)(target));
                return;

            case 6:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.androidDeviceStates = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:
                this.kinectDeviceStates = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 11:
                this.startBtn = ((System.Windows.Controls.Button)(target));

            #line 21 "..\..\..\MainWindow.xaml"
                this.startBtn.Click += new System.Windows.RoutedEventHandler(this.startBtn_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.menu1 = ((System.Windows.Controls.Menu)(target));
                return;

            case 13:

            #line 24 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click);

            #line default
            #line hidden
                return;

            case 14:

            #line 25 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_2);

            #line default
            #line hidden
                return;

            case 15:
                this.MyNotifyIcon = ((Hardcodet.Wpf.TaskbarNotification.TaskbarIcon)(target));
                return;

            case 16:

            #line 37 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click_1);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }