XAML for the Windows Runtime provides language-level support for several data types that are frequently used primitives in the common language runtime (CLR) and in other programming languages such as C++.
XAML for the Windows Runtime provides language-level support for these types.
| XAML primitive | Description |
|---|---|
| x:Boolean | For CLR support, corresponds to Boolean. XAML parses values for x:Boolean as case insensitive. Note that "x:Bool" is not an accepted alternative. |
| x:String | For CLR support, corresponds to String. Encoding for the string defaults to the surrounding XML encoding. |
| x:Double | For CLR support, corresponds to Double. In addition to the numeric values, text syntax for x:Double permits the token "NaN", which is how "Auto" for layout behavior can be stored as a resource value. The tokens are treated as case sensitive. |
| x:Int32 | For CLR support, corresponds to Int32. x:Int32 is treated as signed, and you can include the minus ("-") symbol for a negative integer. In XAML, the absence of a sign in text syntax implies a positive signed value. |
These XAML language primitives are generally the only cases in which you define an object element that uses the x: prefix in your XAML. All other XAML language features are typically used in attribute form, or as a markup extension.
Note By convention, the language primitives for XAML and all other XAML language elements are shown with the "x:" prefix. This is how XAML language elements are typically used in real-world markup. This convention is followed in the documentation for XAML and also in the XAML specification.
Other XAML primitives
The XAML 2009 specification notes other XAML language-level primitives such as x:Uri and x:Single. Unless listed in the table earlier in this topic, however, other primitives are not currently supported by XAML for the Windows Runtime.
Build date: 11/28/2012