Show / Hide Table of Contents

Interface INameScope

Defines a contract for how names of elements should be accessed within a particular XAML namescope, and how to enforce uniqueness of names within that XAML namescope.

Namespace: System.Windows.Markup
Assembly: OpenSilver.dll
Syntax
public interface INameScope

Methods

| Improve this Doc View Source

FindName(String)

Returns an object that has the provided identifying name.

Declaration
object FindName(string name)
Parameters
Type Name Description
System.String name

The name identifier for the object being requested.

Returns
Type Description
System.Object

The object, if found. Returns null if no object of that name was found.

| Improve this Doc View Source

RegisterName(String, Object)

Registers the provided name into the current XAML namescope.

Declaration
void RegisterName(string name, object scopedElement)
Parameters
Type Name Description
System.String name

The name to register.

System.Object scopedElement

The specific element that the provided name refers to.

| Improve this Doc View Source

UnregisterName(String)

Unregisters the provided name from the current XAML namescope.

Declaration
void UnregisterName(string name)
Parameters
Type Name Description
System.String name

The name to unregister.

  • Improve this Doc
  • View Source