Kinect Visual studio Hand pointer RRS feed

  • Question

  • Hi Guys, im new at this forum :)

    I have a Question, im trying out some things with my Kinect V2 and Visual Studio 2015 in the Grid App, did follow a tutorial and after spending now  1 day already in it i just can't get it to work
    Here's what i did

    The Tutorial link


    The app starts normally up, the kinect see's me but i cannot use my hand for the kinect, have no cursor etcc.

    Please help me out, im getting tired of this
    My following code's are  :


    using App15.Common;
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Runtime.InteropServices.WindowsRuntime;
    using Windows.ApplicationModel;
    using Windows.ApplicationModel.Activation;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Navigation;
    using Microsoft.Kinect.Xaml.Controls;
    // The Grid App template is documented at
    namespace App15
        /// <summary>
        /// Provides application-specific behavior to supplement the default Application class.
        /// </summary>
        sealed partial class App : Application
            /// <summary>
            /// Initializes the singleton Application object.  This is the first line of authored code
            /// executed, and as such is the logical equivalent of main() or WinMain().
            /// </summary>
            public App()
                this.Suspending += OnSuspending;
            /// <summary>
            /// Invoked when the application is launched normally by the end user.  Other entry points
            /// will be used such as when the application is launched to open a specific file.
            /// </summary>
            /// <param name="e">Details about the launch request and process.</param>
            protected override async void OnLaunched(LaunchActivatedEventArgs e)
    #if DEBUG
                // Show graphics profiling information while debugging.
                if (System.Diagnostics.Debugger.IsAttached)
                    // Display the current frame rate counters
                    this.DebugSettings.EnableFrameRateCounter = true;
                Frame rootFrame = Window.Current.Content as Frame;
                // Do not repeat app initialization when the Window already has content,
                // just ensure that the window is active
                if (rootFrame == null)
                    // Create a Frame to act as the navigation context and navigate to the first page
                    rootFrame = new Frame();
                    //Associate the frame with a SuspensionManager key                                
                    SuspensionManager.RegisterFrame(rootFrame, "AppFrame");
                    // Set the default language
                    rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0];
                    rootFrame.NavigationFailed += OnNavigationFailed;
                    if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                        // Restore the saved session state only when appropriate
                            await SuspensionManager.RestoreAsync();
                        catch (SuspensionManagerException)
                            //Something went wrong restoring state.
                            //Assume there is no state and continue
                    KinectUserViewer kinectUserViewer = new KinectUserViewer()
                        HorizontalAlignment = HorizontalAlignment.Center,
                        VerticalAlignment = VerticalAlignment.Top,
                        Height = 100,
                        Width = 121,
                    KinectRegion kinectRegion = new KinectRegion();
                    Grid grid = new Grid();
                    kinectRegion.Content = rootFrame;
                    // Place the frame in the current Window
                    Window.Current.Content = grid;
                if (rootFrame.Content == null)
                    // When the navigation stack isn't restored navigate to the first page,
                    // configuring the new page by passing required information as a navigation
                    // parameter
                    rootFrame.Navigate(typeof(GroupedItemsPage), e.Arguments);
                // Ensure the current window is active
            /// <summary>
            /// Invoked when Navigation to a certain page fails
            /// </summary>
            /// <param name="sender">The Frame which failed navigation</param>
            /// <param name="e">Details about the navigation failure</param>
            void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
                throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
            /// <summary>
            /// Invoked when application execution is being suspended.  Application state is saved
            /// without knowing whether the application will be terminated or resumed with the contents
            /// of memory still intact.
            /// </summary>
            /// <param name="sender">The source of the suspend request.</param>
            /// <param name="e">Details about the suspend request.</param>
            private async void OnSuspending(object sender, SuspendingEventArgs e)
                var deferral = e.SuspendingOperation.GetDeferral();
                await SuspensionManager.SaveAsync();
            <!-- Application-specific resources -->
            <x:String x:Key="AppName">App15</x:String>


        DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
            <!-- Collection of items displayed by this page -->
                Source="{Binding Items}"
                d:Source="{Binding Groups[0].Items, Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}"/>
            This grid acts as a root panel for the page that defines two rows:
            * Row 0 contains the back button and page title
            * Row 1 contains the rest of the page layout
        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
            DataContext="{Binding Group}"
            d:DataContext="{Binding Groups[0], Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}">
                <RowDefinition Height="140"/>
                <RowDefinition Height="*"/>
            <!-- Horizontal scrolling grid -->
                AutomationProperties.Name="Items In Group"
                ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
                        <Grid Height="110" Width="480" Margin="10">
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            <Border Background="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
                                <Image Source="{Binding ImagePath}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
                            <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
                                <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextBlockStyle}" TextWrapping="NoWrap"/>
                                <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextBlockStyle}" TextWrapping="NoWrap"/>
                                <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextBlockStyle}" MaxHeight="60"/>
                    <StackPanel Width="480" Margin="0,4,14,0">
                        <TextBlock Text="{Binding Subtitle}" Margin="0,0,0,20" Style="{StaticResource SubheaderTextBlockStyle}" MaxHeight="60"/>
                        <Image Source="{Binding ImagePath}" Height="400" Margin="0,0,0,20" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
                        <TextBlock Text="{Binding Description}" Margin="0,0,0,0" Style="{StaticResource BodyTextBlockStyle}"/>
                    <Style TargetType="FrameworkElement">
                        <Setter Property="Margin" Value="52,0,0,2"/>
            <!-- Back button and page title -->
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="*"/>
                <Button x:Name="backButton" Margin="39,59,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
                            Style="{StaticResource NavigationBackButtonNormalStyle}"
                            AutomationProperties.ItemType="Navigation Button"/>
                <TextBlock x:Name="pageTitle" Text="{Binding Title}" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" 
                            IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,0,30,40"/>

    • Edited by Gerritcarel Wednesday, August 12, 2015 9:17 AM
    • Moved by Shu 2017 Thursday, August 13, 2015 3:04 AM from VC++ forum
    Wednesday, August 12, 2015 9:12 AM

All replies

  • Hi Gerritcarel,

    Thanks for posting in MSDN forum.

    From your post, it seems there is no C++ code and I cannot see any C++ questions. So your post is off-topic in VC++ forum.

    For Kinect v2 SDK development issue, I suggest you ask to Kinect for Windows v2 SDK forum. This forum discusses dedicated to programming with the Kinect for Windows v2 SDK, so I will move to a better forum. Thanks for your understanding.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 13, 2015 3:01 AM