How do I use RelativeSource with WPF bindings and what are the different use-cases?
How do I use RelativeSource with WPF bindings and what are the different use-cases?
Share
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.
If you want to bind to another property on the object:
If you want to get a property on an ancestor:
If you want to get a property on the templated parent (so you can do 2 way bindings in a ControlTemplate)
or, shorter (this only works for OneWay bindings):