Table of Contents

Class AvaloniaPropertyRegistry

Namespace
Avalonia
Assembly
Avalonia.Base.dll

Tracks registered AvaloniaProperty instances.

public class AvaloniaPropertyRegistry
Inheritance
AvaloniaPropertyRegistry
Inherited Members

Constructors

AvaloniaPropertyRegistry()

public AvaloniaPropertyRegistry()

Properties

Instance

Gets the AvaloniaPropertyRegistry instance

public static AvaloniaPropertyRegistry Instance { get; }

Property Value

AvaloniaPropertyRegistry

Methods

FindRegistered(AvaloniaObject, string)

Finds a registered property on an object by name.

public AvaloniaProperty? FindRegistered(AvaloniaObject o, string name)

Parameters

o AvaloniaObject

The object.

name string

The property name.

Returns

AvaloniaProperty

The registered property or null if no matching property found.

Exceptions

InvalidOperationException

The property name contains a '.'.

FindRegistered(Type, string)

Finds a registered property on a type by name.

public AvaloniaProperty? FindRegistered(Type type, string name)

Parameters

type Type

The type.

name string

The property name.

Returns

AvaloniaProperty

The registered property or null if no matching property found.

Exceptions

InvalidOperationException

The property name contains a '.'.

FindRegisteredDirect<T>(AvaloniaObject, DirectPropertyBase<T>)

Finds a direct property as registered on an object.

public DirectPropertyBase<T>? FindRegisteredDirect<T>(AvaloniaObject o, DirectPropertyBase<T> property)

Parameters

o AvaloniaObject

The object.

property DirectPropertyBase<T>

The direct property.

Returns

DirectPropertyBase<T>

The registered property or null if no matching property found.

Type Parameters

T

GetRegistered(AvaloniaObject)

Gets all AvaloniaPropertys registered on a object.

public IReadOnlyList<AvaloniaProperty> GetRegistered(AvaloniaObject o)

Parameters

o AvaloniaObject

The object.

Returns

IReadOnlyList<AvaloniaProperty>

A collection of AvaloniaProperty definitions.

GetRegistered(Type)

Gets all non-attached AvaloniaPropertys registered on a type.

public IReadOnlyList<AvaloniaProperty> GetRegistered(Type type)

Parameters

type Type

The type.

Returns

IReadOnlyList<AvaloniaProperty>

A collection of AvaloniaProperty definitions.

GetRegisteredAttached(Type)

Gets all attached AvaloniaPropertys registered on a type.

public IReadOnlyList<AvaloniaProperty> GetRegisteredAttached(Type type)

Parameters

type Type

The type.

Returns

IReadOnlyList<AvaloniaProperty>

A collection of AvaloniaProperty definitions.

GetRegisteredDirect(Type)

Gets all direct AvaloniaPropertys registered on a type.

public IReadOnlyList<AvaloniaProperty> GetRegisteredDirect(Type type)

Parameters

type Type

The type.

Returns

IReadOnlyList<AvaloniaProperty>

A collection of AvaloniaProperty definitions.

GetRegisteredDirect<T>(AvaloniaObject, DirectPropertyBase<T>)

Gets a direct property as registered on an object.

public DirectPropertyBase<T> GetRegisteredDirect<T>(AvaloniaObject o, DirectPropertyBase<T> property)

Parameters

o AvaloniaObject

The object.

property DirectPropertyBase<T>

The direct property.

Returns

DirectPropertyBase<T>

The registered.

Type Parameters

T

GetRegisteredInherited(Type)

Gets all inherited AvaloniaPropertys registered on a type.

public IReadOnlyList<AvaloniaProperty> GetRegisteredInherited(Type type)

Parameters

type Type

The type.

Returns

IReadOnlyList<AvaloniaProperty>

A collection of AvaloniaProperty definitions.

IsRegistered(object, AvaloniaProperty)

Checks whether a AvaloniaProperty is registered on a object.

public bool IsRegistered(object o, AvaloniaProperty property)

Parameters

o object

The object.

property AvaloniaProperty

The property.

Returns

bool

True if the property is registered, otherwise false.

IsRegistered(Type, AvaloniaProperty)

Checks whether a AvaloniaProperty is registered on a type.

public bool IsRegistered(Type type, AvaloniaProperty property)

Parameters

type Type

The type.

property AvaloniaProperty

The property.

Returns

bool

True if the property is registered, otherwise false.

Register(Type, AvaloniaProperty)

Registers a AvaloniaProperty on a type.

public void Register(Type type, AvaloniaProperty property)

Parameters

type Type

The type.

property AvaloniaProperty

The property.

Remarks

RegisterAttached(Type, AvaloniaProperty)

Registers an attached AvaloniaProperty on a type.

public void RegisterAttached(Type type, AvaloniaProperty property)

Parameters

type Type

The type.

property AvaloniaProperty

The property.

Remarks

UnregisterByModule(IEnumerable<Type>)

Unregister allAvaloniaPropertys registered on types

public bool UnregisterByModule(IEnumerable<Type> types)

Parameters

types IEnumerable<Type>

Returns

bool

Exceptions

ArgumentNullException