Skip to main content

NameScope Class

Implements a name scope.

Definition​

Namespace: Avalonia.Controls
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public class NameScope : INameScope
View Source
InheritanceObject → NameScope
ImplementsINameScope

Constructors​

NameScope()Initializes a new instance of the NameScope class

Properties​

IsCompletedReturns whether further registrations are allowed on the scope

Methods​

Complete() 
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize()Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Find(String)Finds a named element in the name scope, returns immediately, doesn't traverse the name scope stack
FindAsync(String) 
GetHashCode()Serves as the default hash function.
(Inherited from Object)
GetNameScope(StyledElement)Gets the value of the attached NameScopeProperty on a styled element.
GetType()Gets the Type of the current instance.
(Inherited from Object)
MemberwiseClone()Creates a shallow copy of the current Object.
(Inherited from Object)
Register(String, Object)Registers an element in the name scope.
SetNameScope(StyledElement, INameScope)Sets the value of the attached NameScopeProperty on a styled element.
ToString()Returns a string that represents the current object.
(Inherited from Object)

Fields​

NameScopePropertyDefines the NameScope attached property.

Extension Methods​

Find(T)(String)Finds a named element in an INameScope.
(Defined by NameScopeExtensions)
Get(T)(String)Gets a named element from an INameScope or throws if no element of the requested name was found.
(Defined by NameScopeExtensions)

See Also​

Reference​

Avalonia.Controls Namespace