February CTP of WinFX Published -- Breaking Changes

If you haven't seen, the February CTP of WinFX is live.  Be sure to check out the release notes if you are having install/uninstall issues.

Below is an incomplete list of breaking changes:
 

1) The following XML namespace Uris are modified:
 

OLD

https://schemas.microsoft.com/winfx/avalon/2005

NEW

https://schemas.microsoft.com/winfx/2006/xaml/presentation

 

OLD

https://schemas.microsoft.com/winfx/xaml/2005

NEW

https://schemas.microsoft.com/winfx/2006/xaml

 

 

2) The syntax for mapping a CLR namespace to an XML namespace has changed. This is true for namespaces in the same assembly or different a different assembly.  A Mapping Processing Instruction is no longer necessary. 
 

Mapping PI for same assembly

OLD

<?Mapping XmlNamespace="local" ClrNamespace="MyCompany.MyProduct" ?>
<… xmlns:my="local" >

NEW

<… xmlns:my="clr-namespace:MyCompany.MyProduct" >

 

Mapping PI for different assembly

OLD

<?Mapping XmlNamespace="local" ClrNamespace="MyCompany.MyProduct" Assembly="someDLL" ?>
<… xmlns:my="local" >

NEW

<… xmlns:my="clr-namespace:MyCompany.MyProduct;assembly=someDLL" >

For fully specified assembly names, follow the syntax outlined here: https://msdn2.microsoft.com/en-us/library/system.reflection.assemblyname.aspx

3) Specifying columns and rows in Grids is now stricter.

OLD

<Grid>
<ColumnDefinition />
</Grid>.

NEW
<Grid>
<ColumnDefinitions>
<ColumnDefinition/>
</ColumnDefinitions>
</Grid>

4) Increased strictness with databinding such that binding statements must be set using attribute syntax.

OLD
<TextBox.Text>{Binding}</TextBox.Text>

NEW
Text = “{Binding}”

5) System.Windows.Serialization is now System.Windows.Markup

6) UserControl has changed to be a ContentControl. The FixedTemplate property has beenremoved.

OLD

<UserControl>
<UserControl.FixedTemplate>
<Grid>
</Grid>
</UserControl.FixedTemplate>
</UserControl>

 

NEW
<UserControl>
<Grid>
</Grid>
</UserControl>

7) Removing MediaElement.Player property, and the player methods of MediaPlayer onto MediaElement. 

MediaElement myME;

OLD

myME.Player.Play();

NEW

myME.Play(); // new

8) Behavior change to media

In the Jan CTP, the following XAML would play the video file until the file ended, or until the MediaElement was GCd. 

<MediaElement Source=”a.wmv”>

A MediaElement now stops when it is Unloaded by default.

If MediaElement is incorporated into a visual that does not propagate OnLoaded and Unloaded events (such as VisualBrush), it won’t play automatically on Load. There are a number of work-around for this:

If you want to preserve the old behavior of MediaElement of starting to play at parse time rather than OnLoaded - <MediaElement Source=”foo” UnloadedBehavior=”Play”/>

If you want to use a Storyboard - <MediaElement UnloadedBehavior=”Manual”/>

If you want to use code-behind - <MediaElement UnloadedBehavior=”Manual”/>
 

9) In order to insert an XML data island into a XAML file, the XML source must be wrapped in an x:XData tag:
 

OLD

<XmlDataProvider x:Key="aXmlDP">

    <Root xmlns="">

        <Number type="int">333</Number>

    </Root>

</XmlDataProvider>

NEW

<XmlDataProvider x:Key="aXmlDP">

    <x:XData>

        <Root xmlns="">

            <Number type="int">333</Number>

        </Root>

    </x:XData>

</XmlDataProvider>

 11) VideoDrawing is broken in this build.

12) SinglePageViewer is now FlowDocumentPageViewer

12) The relative source binding syntax has changed

OLD

{Binding Path=foo, RelativeSource=/TemplatedParent}
NEW
{Binding Path=foo, RelativeSource='{RelativeSource TemplatedParent}'}