NameScope Class

Summary

Implements a name scope.
Namespace
Avalonia.Controls
Interfaces
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["INameScope"] click Interface0 "/api/Avalonia.Controls/INameScope" Type["NameScope"] class Type type-node

Syntax

public class NameScope : INameScope

Fields

Name Constant Value Summary
NameScopeProperty
Defines the NameScope attached property.
static

Properties

Name Value Summary
IsCompleted bool
Returns whether further registrations are allowed on the scope

Methods

Name Value Summary
Complete() void
Find(string) object
Finds a named element in the name scope, returns immediately, doesn't traverse the name scope stack
FindAsync(string) SynchronousCompletionAsyncResult<object>
GetNameScope(StyledElement) INameScope
Gets the value of the attached NameScopeProperty on a styled element.
static
Register(string, object) void
Registers an element in the name scope.
SetNameScope(StyledElement, INameScope) void
Sets the value of the attached NameScopeProperty on a styled element.
static

Extension Methods

Name Value Summary
Find<T>(string) T
Finds a named element in an INameScope.
Get<T>(string) T
Gets a named element from an INameScope or throws if no element of the requested name was found.