No designer after converting to 3.0

Mar 6, 2012 at 3:30 PM

I have no more designer for my windows and controls after switching to 3.0 beta. I get the following error on opening the designer:

Error    1    Type 'DataWindow' is not usable as an object element because it is not public or does not define a public parameterless constructor or a type converter.

If works at runtime though.

Mar 6, 2012 at 3:34 PM
Edited Mar 6, 2012 at 3:34 PM

This is fixed tonight, we are aware of this issue :)

But keep issues you find coming though!

Mar 6, 2012 at 3:35 PM

Thanks Geert! I'm looking forward to the update.

Mar 6, 2012 at 6:10 PM

It's live, have fun :)

Mar 7, 2012 at 9:49 AM

Now it works, thanks!

Mar 8, 2012 at 6:14 PM

We fixed the issue where you couldn't locatie view models in a separate assembly. Now possible with the latest beta available via nuget.

Mar 12, 2012 at 9:58 AM

Hello Geert!

this is much better, thanks! But I still have one or two issues:

1) I now removed all GetViewModelType() methods and the viewLocator.Register after switching my code in the App() to

var serviceLocator = ServiceLocator.Instance;
serviceLocator.RegisterType<IViewModelLocator, ViewModelLocator>();
serviceLocator.RegisterType<IViewLocator, ViewLocator>();

var viewModelLocator = ServiceLocator.Instance.ResolveType<IViewModelLocator>();

var viewLocator = ServiceLocator.Instance.ResolveType<IViewLocator>();

this works except for the MainWindow, where I still need the GetViewModelType().

2) I also tried the [UP] syntax like this:


viewLocator.NamingConventions.Add("[UP].View.[VM]Window"); viewLocator.NamingConventions.Add("[UP].View.[VM]Control");
But this is not working. It's not really an issue though, as putting the full type at one place is acceptable, it would have just been a bit more clear/nice.


Mar 13, 2012 at 12:57 PM

You can always register a custom instance using the Register method in the locators. However, you are probably not following a naming convention or register the ViewModelLocator too late (but I see that you register it in the constructor of the App class).

Maybe you can take a look at the examples and see how they solve this issue. See