Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RelativeSource.Mode Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets a RelativeSourceMode value that describes the location of the binding source relative to the position of the binding target.

Namespace:   System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

public RelativeSourceMode Mode { get; set; }

Property Value

Type: System.Windows.Data.RelativeSourceMode

One of the RelativeSourceMode values. The default value is null.

Exception Condition

This property is immutable after initialization. Instead of changing the Mode on this instance, create a new RelativeSource or use a different static instance.

This property is read-only after initialization. If this property is not set explicitly, setting the AncestorType or the AncestorType and the AncestorLevel properties will implicitly lock this property value to FindAncestor.

For XAML information, see RelativeSource MarkupExtension.

.NET Framework
Available since 3.0
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2018 Microsoft