Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8894903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:37:43+00:00 2026-06-14T23:37:43+00:00

I want to change the KinectSkeletonViewer control provided in the Kinect examples. I want

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:37:44+00:00Added an answer on June 14, 2026 at 11:37 pm

    You’ll need to modify two files – KinectSkeleton.cs and KinectSkeletonViewer.xaml.cs. You’re creating the binding on the KinectSkeleton but, because this class is not directly referenced and called from the viewer, you also need to create a passthrough binding in KinectSkeletonViewer.

    KinectSkeleton.cs – create the DependencyProperties:

    public static readonly DependencyProperty TrackedJointBrushProperty =
        DependencyProperty.Register(
            "TrackedJointBursh",
            typeof(Brush),
            typeof(KinectSkeleton),
            new FrameworkPropertyMetadata(new SolidColorBrush(Color.FromArgb(255, 68, 192, 68)), FrameworkPropertyMetadataOptions.AffectsRender));
    
    public static readonly DependencyProperty TrackedBonePenProperty =
        DependencyProperty.Register(
            "TrackedBonePen",
            typeof(Pen),
            typeof(KinectSkeleton),
            new FrameworkPropertyMetadata(new Pen(Brushes.Green, TrackedBoneThickness), FrameworkPropertyMetadataOptions.AffectsRender));
    

    KinectSkeletonViewer – create the DependencyProperties

    public static readonly DependencyProperty TrackedJointBrushProperty =
        DependencyProperty.Register(
            "TrackedJointBursh",
            typeof(Brush),
            typeof(KinectSkeletonViewer),
            new PropertyMetadata(new SolidColorBrush(Color.FromArgb(255, 68, 192, 68))));
    
    public static readonly DependencyProperty TrackedBonePenProperty =
        DependencyProperty.Register(
            "TrackedBonePen",
            typeof(Pen),
            typeof(KinectSkeletonViewer),
            new PropertyMetadata(new Pen(Brushes.Green, TrackedBoneThickness)));
    

    In both files define the associated properties:

    public Brush TrackedJointBursh
    {
        get { return (Brush)GetValue(TrackedJointBrushProperty); }
        set { SetValue(TrackedJointBrushProperty, value); }
    }
    
    public Pen TrackedBonePen
    {
        get { return (Pen)GetValue(TrackedBonePenProperty); }
        set { SetValue(TrackedBonePenProperty, value); }
    }
    

    Now you want to link the binding. In the OnLoad event of KinectSkeletonViewer –

    var trackedJointBrush = new Binding("TrackedJointBrush");
    trackedJointBrush.Source = this;
    skeletonCanvas.SetBinding(KinectSkeleton.TrackedJointBrushProperty, trackedJointBrush);
    
    var trackedBonePen = new Binding("TrackedBonePen");
    trackedBonePen.Source = this;
    skeletonCanvas.SetBinding(KinectSkeleton.TrackedBonePenProperty, trackedBonePen);
    

    Finally, you need to look through KinectSkeleton.cs and replace reference of the hard coded colors with the new properties. trackedJointBrush and trackedBonePen in the case of the above examples – replaced with TrackedJointBrush and TrackedBonePen (note case). You can then comment out the hard coded variables.

    You should now be able to bind those two properties in the KinectSkeletonViewer when you declare it in XAML.

    There are a few other colors defined in the KinectSkeleton class. You can use the same concept as above to bind them as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have wpf Expander control and I want change background color of Header when
I have a RadioButtnList. I want change body background color based on radio button
Hi, I had Generate custom layouts in my screen, i want change color or
I want to change the background color of a textbox as an indicator that
can i change border color of checkbox by use css or jquery. i want
i want change title's color of navigation controller but i dont know why doesn't
i want change my UIWebView with Setting bundle . what is the property for
I want change color of this view. I want tabbar more button view color
I want change class property on an iframe I use .contents() which is perfectly
I need jquery to change numbers in all of pages. for example i want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.