Infosys Microsoft Alliance and Solutions blog

« WPF TextBox Memory Issue | Main | Why is the concept of a list so important in SharePoint »

Expression Blend issue with WPF Data binding debugging

Some days back I had pointed to the blog by Beatriz on how to debug WPF data binding errors. I have been using the PresentationTraceSources.TraceLevel feature (available with .NET 3.5) since then and have found it very easy to use and very effective in resolving my data binding errors.

However recently when I opened a XAML, which had this debugging feature enabled, in Expression Blend 2.5 March Preview, I got an error. The XAML won't open in designer and showed "Invalid XAML" with details as 'The member "TraceLevel" is not recognized or is not accessible'.

You can use the following very trivial XAML to reproduce the error.

<Window x:Class="TestWPFApp.Window2"





       xmlns:mc="" mc:Ignorable="d"

       Title="Window2" Height="300" Width="300" x:Name="wnd" >


        <Button x:Name="button1" Content="Click" />

        <Button x:Name="button2" Content="{Binding ElementName=button1, Path=Content, diag:PresentationTraceSources.TraceLevel=Medium}" />



Microsoft has confirmed this to be a bug with Expression Blend 2.5. We can expect to see a fix for this in future releases. Check here for details on this bug.

Note that I have set the TraceLevel to Medium. For basic data binding debugging, this can also suffice since it shows the final Transfer value used by data binding. Setting it to Low will not help much. For most detailed information, however, you need to set it to High.

[Updated: March 26, 2008] I got notification from the MS Connect site that this issue has been fixed. Hopefully this means that the next preview release will have this fix included.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please key in the two words you see in the box to validate your identity as an authentic user and reduce spam.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter