次の方法で共有


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]

 

Share this post

Comments