RelativeSource Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Implements a markup extension that describes the location of the binding source relative to the position of the binding target.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
The RelativeSource type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | RelativeSource() | Initializes a new instance of the RelativeSource class by using the default relative source mode. |
![]() | RelativeSource(RelativeSourceMode) | Initializes a new instance of the RelativeSource class by using the specified relative source mode. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
For XAML usage of RelativeSource, see RelativeSource markup extension.
RelativeSource is a class that supports a XAML markup extension. Markup extensions are typically implemented when there is a requirement to escape attribute values to be other than literal values or to use type converters. All markup extensions in XAML use curly braces ({}) in their attribute syntax, which is the convention by which a XAML processor recognizes that a markup extension must process the attribute. For more information, see the "Markup Extensions" section of XAML for Windows Phone 8. The RelativeSource markup extension is specifically required for setting the Binding::RelativeSource property as a XAML attribute.


