RelativeSource.Mode Property

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)
XML Namespace:

public RelativeSourceMode Mode { get; set; }
/** @property */
public RelativeSourceMode get_Mode ()

/** @property */
public void set_Mode (RelativeSourceMode value)

public function get Mode () : RelativeSourceMode

public function set Mode (value : RelativeSourceMode)

 For XAML information, see RelativeSource MarkupExtension. 

Property Value

One of the RelativeSourceMode values. The default value is a null reference (Nothing in Visual Basic).

Exception typeCondition


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 AncestorLevel property will implicitly lock this property value to FindAncestor.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0