Class RelativeSource
Implements a markup extension that describes the location of the binding source relative to the position of the binding target.
Implements
IMarkupExtension<System.Object>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Data
Assembly: OpenSilver.dll
Syntax
public class RelativeSource : MarkupExtension, IMarkupExtension<object>
Constructors
| Improve this Doc View SourceRelativeSource()
Initializes a new instance of the RelativeSource class by using default relative source mode.
Declaration
public RelativeSource()
RelativeSource(RelativeSourceMode)
Initializes a new instance of the RelativeSource class by using provided relative source mode.
Declaration
public RelativeSource(RelativeSourceMode relativeSourceMode)
Parameters
Type | Name | Description |
---|---|---|
RelativeSourceMode | relativeSourceMode | The relative source mode |
Properties
| Improve this Doc View SourceAncestorLevel
Gets or sets the level of ancestor to look for, in System.Windows.Data.RelativeSourceMode.FindAncestor mode. Use 1 to indicate the one nearest to the binding target element.
Declaration
public int AncestorLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
AncestorType
Gets or sets the type of ancestor to look for.
Declaration
public Type AncestorType { get; set; }
Property Value
Type | Description |
---|---|
System.Type |
Mode
Gets or sets a value that describes the location of the binding source relative to the position of the binding target. Returns a value of the enumeration.
Declaration
public RelativeSourceMode Mode { get; set; }
Property Value
Type | Description |
---|---|
RelativeSourceMode |
Methods
| Improve this Doc View SourceProvideValue(IServiceProvider)
Declaration
public override object ProvideValue(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider |
Returns
Type | Description |
---|---|
System.Object |