We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Platform : WPF
|
Category : DataBinding

What is the use of the RelativeSource property ?

The "RelativeSource" property of the Binding class is used to bind the data from an element by it’s relationship to the source element. RelativeSource is also a markup extension of type RelativeSource.

The following are some of the ways that RelativeSource can be used.

1. When the source element is equal to the target element,

2. When the source element is equal to the target element’s TemplatedParent,

3. When the source element is equal to the closest parent of a given type,

4. When the source element is equal to the nth closest parent of a given type,

5. When the source element is equal to the previous data item in a data - bound collection.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.