#103 – XAML 2009
October 23, 2010 1 Comment
.NET 4.0 introduced an update to the supported XAML vocabulary–the latest version supported is now XAML 2009. WPF and Silverlight do not yet support XAML 2009 (.NET 4 / Visual Studio 2010), but still support XAML 2006.
With respect to Visual Studio 2010, therefore, the features introduced in XAML 2009 can only be used in loose XAML files.
XAML 2009 introduces the following new features, beyond what was present in XAML 2006:
- x:Arguments allows calling non-default constructor (one with parameters)
- x:FactoryMethod allows calling a static method to construct an object rather than using a constructor
- x:Reference markup extension makes it easier to set a property value to point to an instance of another object
- x:TypeArguments allows use of generics
- Built-in support in x: namespace for standard CLR primitive data types (e.g. string, int, float, etc). Avoids adding a separate XML namespace.
See also: XAML 2009 Language Features