Xaml 2009 Features: Built in Types
In Xaml2009, we have built-in support for common CLR types which simplifies authoring. So rather than specifying something like
<s:String xmlns:s="clr-namespace:System;assembly=mscorlib"> Foo </s:String>
We can use the notation <x:String > Foo </s:String>
The list of types supported is below:
• <x:String>
• <x:Char>
• <x:Single>
• <x:Double>
• <x:Boolean>
• <x:Byte>
• <x:Int16>
• <x:Int32>
• <x:Int64>
• <x:Decimal>
• <x:Object>
• <x:Uri>
• <x:TimeSpan>
• <x:Array>
One thing to note is wrt WPF this will work only in loose Xaml. This means that these features cannot be used within Cider\Blend. Rob has a post clarifying the absence of tooling support.
Now you get the slight change in title J
[This is part of a series on New WPF\XAML Features]
Comments
Anonymous
November 05, 2009
The comment has been removedAnonymous
November 05, 2009
Robert, we understand that this is not ideal. Please read the clarifying postcomments by Rob http://blogs.windowsclient.net/rob_relyea/archive/2009/05/20/yes-xaml2009-isn-t-everywhere-yet.aspxAnonymous
November 05, 2009
The comment has been removedAnonymous
November 05, 2009
Daniel, the xaml generated by tools like cider and Blend always have the follows namespaces declared by default (and not just the first one) xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"Anonymous
November 06, 2009
The comment has been removedAnonymous
November 06, 2009
as mentioned, it is an improvement in the authoring experience.Anonymous
November 28, 2009
The comment has been removedAnonymous
November 30, 2009
Thats good feedback John. We'll consider it for future releases.