In Silverlight, a XAML namescope stores relationships between the XAML-defined names of objects and their instance equivalents. This is similar to the wider meaning of the term "namescope" in other programming languages and technologies. XAML namescopes are created while parsing a XAML source and creating an object representation. The names in a XAML namescope are then used by code-behind operations at run time to access the objects that were created by parsing the XAML. A name is specified in XAML by setting the value for one of two nearly equivalent attributes, In general, attributes in XAML can be specified only on object elements. Property elements (used to provide values for certain Silverlight properties in XAML) cannot have a
How XAML Namescopes Are Defined
XAML namescopes are created by a XAML processor whenever XAML content is parsed. The most common XAML namescope scenario is when the initial source XAML content for a Silverlight-based application is parsed. Typically, the source XAML of the element tree for any given page of an application is defined within a single XAML file, which is completely in XAML format. (Resources might be defined in a different file, but resources are not added to XAML namescopes.) Each name specified within the XAML is added to the default XAML namescope, which is associated with the root element in the XAML markup provided. For this reason, this XAML namescope is typically referred to in this documentation as the root XAML namescope.

Comments
Join the conversation! Your thoughts help the community grow.