Notes on WPF Changes
from November 2005 CTP
to February 2006 CTP

The February 2006 Community Technology Preview (CTP) build of WinFX contains API changes from the November 2005 CTP. While the basic design and principles discussed in Programming Windows Presentation Foundation: Beta Edition are unchanged, some of the details are different from our last list of changes (from September 2005 CTP to November 2005 CTP).

 

You’ll also want to check out Karsten’s February CTP of WinFX Published -- Breaking Changes.

General

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

use:

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

 and instead of:

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

use

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

Layout

 

 

Graphics

Writing Custom Controls

 

DefaultStyleKeyProperty.OverrideMetadata(typeof(MyCustomControl18),

            new FrameworkPropertyMetadata(typeof(MyCustomControl18)));

 

Second, you must supply a ThemeInfo assembly-level attribute:

 

[assembly:ThemeInfo(ResourceDictionaryLocation.SourceAssembly, ResourceDictionaryLocation.SourceAssembly)]

 

ThemeInfo is defined in the System.Windows namespace.

 

 

XAML

 

For example, if you had a DLL called FooLib.dll that defined types in a namespace MyComponent.Stuff, whereas previously you might have written

 

<?Mapping ClrNamespace="MyComponent.Stuff" Assembly="FooLib"

          XmlNamespace="foo"?>

<Window xmlns:foo="foo" ...>

    ...

 

You would now just write:

 

<Window xmlns:foo="clr-namespace:MyComponent.Stuff;assembly=FooLib" ...>

    ...

 

Note that the “;assembly=AsmName” part is optional. If you wish to refer to types defined in the same component as the relevant XAML file, this would be sufficient:

 

<Window xmlns:foo="clr-namespace:MyComponent.Stuff " ...>

    ...

 

 

 

    <Family xmlns="">

      <Person Name="Tom" Age="9" />

      <Person Name="John" Age="11" />

      <Person Name="Melissa" Age="36" />

    </Family>

</XmlDataProvider>


becomes:

<XmlDataProvider x:Key="Family" XPath="/Family/Person">

  <x:XData>

    <Family xmlns="">

      <Person Name="Tom" Age="9" />

      <Person Name="John" Age="11" />

      <Person Name="Melissa" Age="36" />

    </Family>

  </x:XData>

</XmlDataProvider>

Interop

 

<wfi:WindowsFormsHost>

  ...

</wfi:WindowsFormsHost>

 

becomes:

 

<WindowsFormsHost>

  ...

</WindowsFormsHost>