Table of Contents

Class RelativeSource

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

RelativeSource Modes are PreviousData - use the DataContext from the previous scope TemplatedParent- use the target element's styled parent Self - use the target element itself FindAncestor - use the hosting Type Only FindAncestor mode allows AncestorType and AncestorLevel.

[MarkupExtensionReturnType(typeof(RelativeSource))]
public class RelativeSource : MarkupExtension, ISupportInitialize
Inheritance
RelativeSource
Implements

Constructors

RelativeSource()

Constructor

RelativeSource(RelativeSourceMode)

Constructor

RelativeSource(RelativeSourceMode, Type, int)

Constructor for FindAncestor mode

Properties

AncestorLevel

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

AncestorType

The Type of ancestor to look for, in FindAncestor mode.

Mode

mode of RelativeSource

PreviousData

static instance of RelativeSource for PreviousData mode.

Self

static instance of RelativeSource for Self mode.

TemplatedParent

static instance of RelativeSource for TemplatedParent mode.

Methods

ProvideValue(IServiceProvider)

Return an object that should be set on the targetObject's targetProperty for this markup extension.