XAML intrinsic data types
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++.
The most common place you'll see XAML intrinsic data type usages is when resources are defined in a XAML resource dictionary. You might define constants there, for example numbers that you use for multiple values. Or you might use a storyboarded animation that animates using a string or Boolean value, and you'll then need a XAML object element representing the string or Boolean to fill the keyframe of your ObjectAnimationUsingKeyFrames definition. The Windows Runtime default XAML templates use both these techniques.
XAML for the Windows Runtime provides language-level support for these types.
|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.
You can use scientific notation, for example "1+E06" for |
|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.
The XAML 2009 specification notes other XAML language-level primitives such as x:Uri and x:Single. Unless listed in the table in this topic, other XAML language primitives as defined by other XAML vocabularies or by the XAML 2009 specification are not currently supported in XAML for the Windows Runtime.