NameScope Class
Definition
Implements a name scope.
public class NameScope
Constructors
| Name | Description |
|---|---|
| NameScope | No summary available. |
NameScope Constructor
public NameScope()
Methods
| Name | Description |
|---|---|
| Complete | No summary available. |
| Find | Finds a named element in the name scope, returns immediately, doesn't traverse the name scope stack |
| FindAsync | No summary available. |
| GetNameScope | Gets the value of the attached Avalonia.Controls.NameScope.NameScopeProperty on a styled element. |
| Register | Registers an element in the name scope. |
| SetNameScope | Sets the value of the attached Avalonia.Controls.NameScope.NameScopeProperty on a styled element. |
Complete Method
public void Complete()
Find Method
Finds a named element in the name scope, returns immediately, doesn't traverse the name scope stack
public object Find(string name)
Parameters
name string
The name.
Returns
object
The element, or null if the name was not found.
FindAsync Method
public Avalonia.Utilities.SynchronousCompletionAsyncResult<T><object> FindAsync(string name)
Parameters
name string
Returns
Avalonia.Utilities.SynchronousCompletionAsyncResult<T><object>
GetNameScope Method
Gets the value of the attached Avalonia.Controls.NameScope.NameScopeProperty on a styled element.
public Avalonia.Controls.INameScope GetNameScope(Avalonia.StyledElement styled)
Parameters
styled Avalonia.StyledElement
The styled element.
Returns
The value of the NameScope attached property.
Register Method
Registers an element in the name scope.
public void Register(string name, object element)
Parameters
name string
The element name.
element object
The element.
SetNameScope Method
Sets the value of the attached Avalonia.Controls.NameScope.NameScopeProperty on a styled element.
public void SetNameScope(Avalonia.StyledElement styled, Avalonia.Controls.INameScope value)
Parameters
styled Avalonia.StyledElement
The styled element.
value Avalonia.Controls.INameScope
The value to set.
Properties
| Name | Description |
|---|---|
| IsCompleted | Returns whether further registrations are allowed on the scope |
IsCompleted Property
Returns whether further registrations are allowed on the scope
public bool IsCompleted { get; set; }
Fields
| Name | Description |
|---|---|
| NameScopeProperty | Defines the NameScope attached property. |
NameScopeProperty Field
Defines the NameScope attached property.
public Avalonia.AttachedProperty<TValue><Avalonia.Controls.INameScope> NameScopeProperty