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

  • Home
  • SEARCH
  • 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 8530467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:15:10+00:00 2026-06-11T09:15:10+00:00

Here’s the problem I often encounter when I develop complex controls in WPF. I

  • 0

Here’s the problem I often encounter when I develop complex controls in WPF.

I want to bind some properties up to multiple levels of parent.

I’m currently using this with RelativeSource and TemplatedParent :

Value="{Binding PropertyToBind, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"

But with this, you can just bind to the direct parent, and I have 4 levels… So I made 4 binding to finally bind to the good value.

I cannot remove my 4 levels of object, they are complex controls…

For example, my first level is my Joystick control. In my joystick, I have a Slider control (2nd level) to move up and down. In my Slider, I have a Button (3rd level). In my button, I have a Text (4th level) that I want to bind to a propety in my level 1 (Joystick).

What I do is I bind my text to a property in the button, then I bind the property of the button to the one in the Slider, etc.. to the Joystick. Sometimes, I need to create custom controls (with added properties where I can bind).

This is not my scenario, it’s just an example (yes in this we can probably remove some levels but not in mine) I don’t want an answer with: remove this or this object…

Is there a way to bind directly to multiple levels? Each level is a ControlTemplate in a Style.

I’m using WPF 4, .NET 4.0, Blend 4, Visual Studio 2010

  • 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-11T09:15:12+00:00Added an answer on June 11, 2026 at 9:15 am

    Have you tried the other permutations of RelativeSource in your binding? Specifically, you can use RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type SomeType}} to find a specific control above you, which looks like it might work well for your scenario.

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

Sidebar

Related Questions

Here is my code...I have two dimensional matrices A,B. I want to develop the
Here is the problem. Every single library I develop logs something, however I don't
Here's the problem, I want to change play button to pause button when the
Here is my problem : I have a post controller with the action create.
Here my problem: @Assert\Regex( * pattern=/^[A-Za-z0-9][A-Za-z0-9\]*$/, * groups={creation, creation_logged} * ) I'm using the
Here is the problem that I am trying to solve. I have two folders
Here's what I'm doing. I want to upload multipart file via Ajax to my
here i want to understand the architecture of bluez (Bluetooth Stack Protocol). I understood
Here's a problem I ran into recently. I have attributes strings of the form
Here's a coding problem for those that like this kind of thing. Let's see

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.