Cannot find resource named 'Locator' thrown at design time in Blend 4, WPF4
In the application I am developing, I have a MainWindow, 开发者_如何学Gowhich is divided in several Views. Each View is a UserControl and has its own ViewModel.
By setting a DataContext inside the UserControl, I am able to work in Expression Blend 4 with design-time data. Ops, forgot to say: I am using the "basic" Locator class, no MEF or so. Hence, in the UserControl I have something like this:
DataContext="{Binding MyControl, Source={StaticResource Locator}}"
Everything works as expected when I am designing the UserControl itself, but I am not able to get rid of some annoying exceptions that are raised in the MainWindow that contains it.
Expression Blend is saying: "Cannot find resource named 'Locator'. Resource names are case sensitive". Naturally, that's not true...
I read around that this was an old issue, now resolved.
So, does anyone know why I am getting this error?
Cheers, Gianluca
Your issue appears similar to the one reported here: Blend reports an error that it cannot find the key for ViewModelLocator
精彩评论