WPF Major Breaking Changes in Feb 2006 CTP


This is intended as a quick guide to the major breaking changes that will affect Windows Presentation Foundation applications, rather than providing an exhaustive list:



  • Schemas have changed for WPF and XAML. Instead of:
    http://schemas.microsoft.com/winfx/avalon/2005
    use:
    http://schemas.microsoft.com/winfx/2006/xaml/presentation
    Instead of:
    http://schemas.microsoft.com/winfx/xaml/2005
    use:
    http://schemas.microsoft.com/winfx/2006/xaml
  • We’ve tightened up the definition of Grids – make sure you wrap ColumnDefinition and RowDefinition elements within a corresponding Grid.ColumnDefinitions or Grid.RowDefinitions element. (Previously you couldn’t use this syntax within templates.)
  • SinglePageViewer is now FlowDocumentPageViewer (this makes sense, since the viewer is used for FlowDocuments!)
  • The relative source binding syntax has changed: replace
    {Binding Path=foo, RelativeSource=/TemplatedParent}
    with
    {Binding Path=foo, RelativeSource='{RelativeSource TemplatedParent}’}

UPDATE: Karsten and I are less well synchronized than normal this week since we’re temporarily in different continents. He’s posted a separate list of breaking changes on his blog. Check both locations out – he’s got a few that I don’t have and vice versa.


UPDATE 2: Rob has a nice tool that makes some of these updates automatically. He also mentions the external assembly referencing breaking change (another one I missed – doh!)


Comments (9)

  1. damien morton says:

    So these are the breaking changes.

    What kinds of non-breaking changes are in the Feb CTP?

    Im thinking in particular of WPF changes.

  2. tims says:

    New features, you mean? I can’t think of any further additions off-hand – we’re really locked and loaded for RTM at this point.

  3. Stephen Vanterpool says:

    I’m more curious about what other breaking changes there are.

  4. Slavo Furman says:

    Is Feb’2006 CTP of Avalon/WPF feature complete?

    thanks,

    Slavo.

  5. jfo's coding says:

    Feb CTP is out.  This CTP, the Cider install is integrated into the Visual Studio "Orcas" Development…

  6. Zeeshan says:

    How to use RelativeSource for ParentData

    as previously we use

    {Binding Path=foo, RelativeSource=/ParentData}

    But now there are four options

    1. Self  2. TemplatedParent 3. PreviousData 4.FindAncestor

    I think FindAncestor is good option in place of ParentData

    but it didn’t work

    as i use AncestorType is required if FindAncestor

    <Binding Path="Data">

          <Binding.RelativeSource>

              <RelativeSource Mode="FindAncestor"

                        AncestorType="{x:Type StackPanel}">

              </RelativeSource>

         </Binding.RelativeSource>

    </Binding>

    its not working. Any Idea?

  7. George Mount says:

    How do you translate

     {Binding RelativeSource=/TemplatedParent/TemplatedParent}

    into the new syntax for RelativeSource?

    I tried using

     {Binding RelativeSource={RelativeSource Mode=TemplatedParent, AncestorLevel=2}}

    But it doesn’t work.

  8. Adam Nathan says:

    George,

    The following should work:

    {Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplatedParent}

  9. tom says:

    any idea why this doesn’t work?

    <Window x:Class="TemplateExample.Window1"

       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;

       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml&quot;

       Title="TemplateExample" Height="300" Width="300"

       >

     <Window.Resources>

       <XmlDataProvider x:Key="Index" XPath="/Chapters">

         <x:XData>

           <Chapters xmlns="">

             <Chapter>

               <Title>Title 1</Title>

               <Name>Name 1</Name>

             </Chapter>

             <Chapter>

               <Title>Title 2</Title>

               <Name>Name 2</Name>

             </Chapter>

           </Chapters>

         </x:XData>

       </XmlDataProvider>

       <DataTemplate x:Key="MyTemplate">

         <StackPanel>

           <TextBox FontSize="14" FontWeight="Bold" FontStyle="Oblique" Text="{Binding XPath=Title}" />

           <TextBox FontSize="14" FontWeight="Bold" FontStyle="Italic" Text="{Binding XPath=Name}" />

         </StackPanel>

       </DataTemplate>

     </Window.Resources>

     <StackPanel>

       <ListBox Background="Aqua"

                ItemsSource="{Binding Source={StaticResource Index}, Path=Chapter}"

                ItemTemplate="{StaticResource MyTemplate}" />

     </StackPanel>

    </Window>