I want to change the KinectSkeletonViewer control provided in the Kinect examples.
I want to expose a property to change the color of the skeleton (tracked bones).
What i need to do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll need to modify two files –
KinectSkeleton.csandKinectSkeletonViewer.xaml.cs. You’re creating the binding on theKinectSkeletonbut, because this class is not directly referenced and called from the viewer, you also need to create a passthrough binding inKinectSkeletonViewer.KinectSkeleton.cs – create the DependencyProperties:
KinectSkeletonViewer – create the DependencyProperties
In both files define the associated properties:
Now you want to link the binding. In the
OnLoadevent of KinectSkeletonViewer –Finally, you need to look through KinectSkeleton.cs and replace reference of the hard coded colors with the new properties.
trackedJointBrushandtrackedBonePenin the case of the above examples – replaced withTrackedJointBrushandTrackedBonePen(note case). You can then comment out the hard coded variables.You should now be able to bind those two properties in the
KinectSkeletonViewerwhen you declare it in XAML.There are a few other colors defined in the
KinectSkeletonclass. You can use the same concept as above to bind them as well.