Click here to Skip to main content
13,898,662 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 9 Jan 2015
Licenced CPOL

Visual Studio 2010 WPF Trace Settings Default Is Incorrect

, 9 Jan 2015
Rate this:
Please Sign up or sign in to vote.
Visual Studio 2010 WPF Trace Settings Default Is Incorrect

A few weeks ago, I found that after setting the attached property PresentationTraceSources.TraceLevel=High on a binding, I was not getting the expected verbose output.

You can see an obvious error in the Path property name.


    Text="{Binding diag:PresentationTraceSources.TraceLevel=High,  
            Path=XCustomerID}" />

Using the above in WPF 3.5 SP1 would result in many messages being outputted in the Debugger Output Window.

However, in Visual Studio 2010 WPF 4.0, I was only seeing the below single binding error:

System.Windows.Data Error: 40 : BindingExpression path error: 
‘XCustomerID’ property not found on ‘object’ "ListCollectionView’ (HashCode=55179487)’. 
BindingExpression:Path=XCustomerID; DataItem=’ListCollectionView’ (HashCode=55179487); 
target element is ‘TextBlock’ (Name=’CustomerIDTextBlock’); 
target property is ‘Text’ (type ‘String’)

The reason the expected messages are not being outputted is because the installation default setting of the WPF Trace Settings is “Error” and not “Warning.” When set to “Error”, no “Warning” messages will be outputted.

To enable the PresentationTraceSources.TraceLevel messages to be seen, you need to change your Tools, Options, Debugging, Output Window, WPF Trace Settings, Data Binding value to Warning as I’ve done in the below image.


Have a great day writing your applications!

Just a grain of sand on the worlds beaches.

Filed under: CodeProject, Data Binding, Tips, Visual Studio 2010, WPF General


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Karl Shifflett
Architect Self
United States United States

I’m a passionate Platform Architect at Infragistics.

I’m a long-time WPF-Prism fanatic who enjoys writing developer tools and line of business applications.

My front end passions are WPF, Electron, ES2015 (ES6), Node.js, and Angular.

For the back end I use what is appropriate for the project: SQL Server and ASP.NET WebAPI, MongoDB, Express, Azure, Firebase, etc.

I am very pragmatic software engineer and strive to write simple, maintainable, and testable code. Simple code allows for solving complex problems in a maintainable way.

My Blog

My Github Repros

Just a grain of sand on the worlds beaches.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190306.1 | Last Updated 9 Jan 2015
Article Copyright 2015 by Karl Shifflett
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid