Table of Contents

Class RelativeSource

Namespace
Avalonia.Data
Assembly
Avalonia.Markup.dll

Describes the location of a binding source, relative to the binding target.

public class RelativeSource
Inheritance
RelativeSource
Inherited Members

Constructors

RelativeSource()

Initializes a new instance of the RelativeSource class.

public RelativeSource()

Remarks

This constructor initializes Mode to FindAncestor.

RelativeSource(RelativeSourceMode)

Initializes a new instance of the RelativeSource class.

public RelativeSource(RelativeSourceMode mode)

Parameters

mode RelativeSourceMode

The relative source mode.

Properties

AncestorLevel

Gets the level of ancestor to look for when in FindAncestor mode.

public int AncestorLevel { get; set; }

Property Value

int

Remarks

Use the default value of 1 to look for the first ancestor of the specified type.

AncestorType

Gets the type of ancestor to look for when in FindAncestor mode.

public Type? AncestorType { get; set; }

Property Value

Type

Mode

Gets or sets a value that describes the type of relative source lookup.

public RelativeSourceMode Mode { get; set; }

Property Value

RelativeSourceMode

Tree

public TreeType Tree { get; set; }

Property Value

TreeType