Alex Rivera | Logout

MVVM Light + Blend designer view error: Cannot find resource named 'Locator'.

Asked 2010-04-19T08:05:25.650
17

The application runs fine but i could not see my design in the designer view.

It says Cannot find resource named 'Locator'. Obviously, i did not change anything in the code, i just did the data binding using the data binding dialog...

anyone facing the same problem?

Edit
Report

2 Answers

1

I had a similar problem with a user control resource.
I added this in my usercontrol xaml code:

<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/GinaControls;component/Resources/GinaControlsColors.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</UserControl.Resources>

Where GinaControls is the namespace where the control class is declared and /Resources/GinaControlsColors.xaml is the project folder and xaml resource file name.

Hope this helps.

answered 2012-01-15T15:38:32.693
0

Make sure the Blend has opened the entire solution and NOT just the single project containing the views. I was right-clicking in Visual Studio and selecting Open In Expression Blend. To my surprize, Blend could not find the solution file, so it only opened the single project.

When I realized this, I launched Blend directly, pointed it to the solution file, and then Blend was able to find the ViewModelLocator in my view.

answered 2011-08-11T23:47:36.810

Your Answer