NameScope Class
Implements base support for the INameScope methods that store or retrieve name-object mappings into a particular namescope, and adds attached property support to make it simpler to get or set identifier namescope information dynamically at the element level..
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
This class implements built-in namespace support and also supports creation of scopes for name resolutions that are created by processes that occur outside of normal XAML loading of elements. For instance, NameScope assists in creation of initial namescopes based on parsing XAML, such as when instantiating styles and templates.
For most scenarios, the FindName methods exposed on FrameworkElement and FrameworkContentElement are more appropriate methods to call to search for elements by name. The Name properties exposed by FrameworkElement and FrameworkContentElement are more appropriate properties to use to set the initial name as markup attributes.
The various methods of NameScope are used by base elements and other classes that maintain XAML namescopes in order to support RegisterName and FindName. You generally use the API in the NameScope class only if you are replacing or augmenting the base element behavior for how they process XAML namescopes for root elements of a XAML page, and as part of templates (which use a separate XAML namescope from the rest of the page).
Other similar methods exist on specialized namescopes. For details, see WPF XAML Namescopes.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.