Nick Kramer blogged about some changes in the February CTP with regard to templates. Basically allowing for the creation of templates which are more than simple FrameworkElementFactory's. This is truly great because it makes templates useful again. Previously almost every time I went to define a template I ran into some kind of limitation, the most common being the inability to apply bindings on Freezables.
But now, with the changes in the Feb CTP I can write silly little programs like this: (all with zero code).
<Window x:Class="FebCTPTest.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <Viewbox> <StackPanel> <StackPanel.Resources> <DataTemplate x:Key="DTTest"> <Button> <Button.LayoutTransform> <RotateTransform Angle="{Binding}" /> </Button.LayoutTransform> Hello? </Button> </DataTemplate> </StackPanel.Resources> <ContentControl Content="45" ContentTemplate="{StaticResource DTTest}" /> <ContentControl Content="90" ContentTemplate="{StaticResource DTTest}" /> <ContentControl Content="180" ContentTemplate="{StaticResource DTTest}" /> </StackPanel> </Viewbox> </Window>
I haven't dug very deep yet, so I only have one other thing to mention for now. It seems to be undocumented but thanks to Xx Xxx Xxxx we can finally bind directly to the Xxxxxxx property of XxxXxxxxx and XxxXxxxxxxxx! (Update: Sorry looks like this change didn't happen)
I shall save my favorite missing features for another entry.
