Skip to main content

RelativeSource Class

Definition​

Namespace:Avalonia.Data
Assembly:Avalonia.Base
Package:Avalonia

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

public class RelativeSource

Inheritance: object -> RelativeSource

Constructors​

NameDescription
RelativeSource (2 overloads)Initializes a new instance of the Avalonia.Data.RelativeSource class.

RelativeSource overloads​

RelativeSource Constructor​

Initializes a new instance of the Avalonia.Data.RelativeSource class.

public RelativeSource()
Remarks​

This constructor initializes Avalonia.Data.RelativeSource.Mode to Avalonia.Data.RelativeSourceMode.FindAncestor.

RelativeSource Constructor​

Initializes a new instance of the Avalonia.Data.RelativeSource class.

public RelativeSource(Avalonia.Data.RelativeSourceMode mode)
Parameters​

mode Avalonia.Data.RelativeSourceMode

The relative source mode.

Properties​

NameDescription
AncestorLevelGets the level of ancestor to look for when in Avalonia.Data.RelativeSourceMode.FindAncestor mode.
AncestorTypeGets the type of ancestor to look for when in Avalonia.Data.RelativeSourceMode.FindAncestor mode.
ModeGets or sets a value that describes the type of relative source lookup.
TreeNo summary available.

AncestorLevel Property​

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

public int AncestorLevel { get; set; }

Remarks​

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

AncestorType Property​

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

public Type AncestorType { get; set; }

Mode Property​

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

public Avalonia.Data.RelativeSourceMode Mode { get; set; }

Tree Property​

public Avalonia.Data.TreeType Tree { get; set; }