This is part of a series on New WPF\XAML Features Another new feature in XAML 2009 is the possibility of creating objects using the non-default constructors. The keyword here is x:Arguments So creating a person object with a constructor requiring Name\Age could be written in XAML as <local:Person> <x:Arguments> <x:String>Tom</x:String> <x:Int32>21</x:Int32> …
Tag: XAML 2009 features
XAML 2009 Features: Generics Support
This is part of a series on New WPF\XAML Features XAML 2009 supports generics J .. In previous releases, if you needed to have an observableCollection for databinding you would probably have written code like class PersonCollection:ObservableCollection<Person>{} <l:PersonCollection> <Person Name=”Tom” /> </l:PersonCollection> In this release, you can now write this…
XAML 2009 Features: Named Object References
This is part of a series on New WPF\XAML Features In previous releases, if you needed to reference a named object, your XAML would look something like <Label Target='{Binding ElementName=firstNameBox}’ >_Target</Label> <TextBox Name=’firstNameBox’>Uses Binding</TextBox> In the current release (.NET 4), we introduced a built in markup extension x:Reference. This would enable referencing…
XAML 2009 Features: XAML Event handling
[This is part of a series on New WPF\XAML Features] In previous releases, when loose XAML had events in it and was loaded it would crash. In V4, there are 2 options to avoid this crash. à On loading events are searched on the root object of the XAML file. Suppose you had the loose…
XAML 2009 Features: Node Loop flexibility
[This is part of a series on New WPF\XAML Features] So by now most of you must have noticed the System.Xaml dll as part of your .NET 4 WPF projects. It’s a well componentized XAML stack that provides a lot of flexibility working with XAML. So at the core we a System.Xaml.XamlReader and…
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>…
System.Xaml: Method calls from Xaml
Xaml is awesome. I am hearing lot of “yeah”s… So have you tried out the new System.Xaml stack in .NET 4.0. If you havent give it a shot. It new and improved … One of the guys on the Xaml team is Shree and I finally got him to write a post on System.Xaml… Bet…