XAML-Specific Elements and Attributes

Strictly speaking, XML-based grammars do not support true keywords. However, XML parsers can be
programmed to look for special tokens that will be treated in a special, customized manner. The same is true
for XAML as it defines a number of tokens that can be regarded as ‘keywords’ in a general sense. Many of
these are used to control how the XAML markup is processed at compile time.

Because these XAML-specific tokens are part of the XAML namespace, they should be qualified with the x:
prefix (x:Name, x:Class, and so forth). You will see additional XAML tokens beyond the following over the
course of this class.
XAML-Specific Elements and Attributes
Table of Contents
Copyright (c) 2008.  Intertech, Inc. All Rights Reserved.  This information is to be used exclusively as an
online learning aid.  Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials


XAML Keyword


Meaning in Life

x:Class

Used to establish the name of the class used in conjunction with the
markup.

x:Key

Allows you to establish a key value for a XAML item that will be placed
into a resource dictionary.

x:Name

This allows you to specify the generated C# / VB name of a given XAML
element.

x:Null

Represents a null reference.

x:ClassModifer

x:FieldModifer

Allows you to control the visibility of the compiler generated member or
class.

StaticResource

Allows you to make reference to a resource declared elsewhere.

Binding

Used to establish a data binding operation in markup.
Services