views:

229

answers:

3

Visual Studio WPF editor worked fine all the time. Yesterday, it started complaining about the aforementioned error. I don't recall fiddling with its settings or anything. What's up?

I want to fix the editor and not wade through my code adding Path=. everywhere.

+1  A: 

Try rebuilding your project. I've noticed that in VS 2008, if you have complex references to custom controls, the editor does not work sometimes until you build. After the build it updates the references.

Josh G
A: 

Visual Studio 2008's WPF editor is very immature... it has issues every once in a while. Rebuilding usually fixes them. Sometimes I need to quit and restart it.

emddudley
+3  A: 

If you've upgraded to Visual Studio SP 1, I'm afraid you will have to do so (add Path=. to your code)

This is a known issue in VS 2008 SP1. The workaround mentioned is to use it in this way, DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=.}"

Reference: http://dotnet.chronus.com/Windows-Presentation-Foundation-(WPF)


References:

Andreas Grech