Share via


4.661 RelativeSource

x:Object > x:MarkupExtension > RelativeSource

(usage)

{RelativeSource } | <RelativeSource />

(description)

Implements a markup extension that describes the location of the binding source relative to the position of the binding target.

(used by)

Binding

[return value type]

RelativeSource

[constructors]

(3 parameters)

mode

RelativeSourceMode

(description)

One of the RelativeSourceMode values. For this signature to be relevant, this should be FindAncestor.

ancestorType

x:XamlType

(description)

The Type of ancestor to look for.

ancestorLevel

x:Int32

(description)

The ordinal position of the desired ancestor among all ancestors of the given type.

(1 parameter)

mode

RelativeSourceMode

(description)

One of the RelativeSourceMode values.

(properties)

AncestorLevel

x:Int32

(description)

The level of ancestor to look for, in FindAncestor mode. Use 1 to indicate the one nearest to the binding target element.

AncestorType

x:XamlType

(description)

The type of ancestor to look for.

Mode

RelativeSourceMode

(description)

A RelativeSourceMode value that describes the location of the binding source relative to the position of the binding target.

(static properties)

PreviousData

RelativeSource

(description)

A static value that is used to return a RelativeSource constructed for the PreviousData mode.

Self

RelativeSource

(description)

A static value that is used to return a RelativeSource constructed for the Self mode.

TemplatedParent

RelativeSource

(description)

A static value that is used to return a RelativeSource constructed for the TemplatedParent mode.