Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

CHAPTER 4: Skeleton Tracking > SkeletonViewer User Control

SkeletonViewer User Control

As you work with Kinect and the Kinect for Windows SDK to build interactive experiences, you find that during development it is very helpful to actually see a visual representation of skeleton and joint data. When debugging an application, it is helpful to see and understand the raw input data, but in the production version of the application, you do not want to see this information. One option is to take the code we wrote in the skeleton viewer exercise and copy and paste it into each application. After a while, this becomes tedious and clutters your code base unnecessarily. For these reasons and others, it is helpful to refactor this code so that it is reusable.

Our goal is to take the skeleton viewer code and add to it so that it provides us more helpful debugging information. We accomplish this by creating a user control, which we name SkeletonViewer. In this user control, the skeleton and joint UI elements are drawn to the UI root of the user control. The SkeletonViewer control can then be a child of any panel we want. Start by creating a user control and replace the root Grid element with the code in Listing 4-13.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint