You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The automatic registration of ViewModels is not working, if the ViewModelBaseType is set to a class and not an interface. To solve this problem you should change in the Configure method the registration of ViewModels to:
// register view models
builder.RegisterAssemblyTypes(AssemblySource.Instance.ToArray())
// must be a type with a name that ends with ViewModel
.Where(type => type.Name.EndsWith("ViewModel"))
// must be in a namespace ending with ViewModels
.Where(type => EnforceNamespaceConvention ? (!(string.IsNullOrWhiteSpace(type.Namespace)) && type.Namespace.EndsWith("ViewModels")) : true)
// must implement INotifyPropertyChanged (deriving from PropertyChangedBase will statisfy this)
////.Where(type => type.GetInterface(ViewModelBaseType.Name, false) != null)
The automatic registration of ViewModels is not working, if the ViewModelBaseType is set to a class and not an interface. To solve this problem you should change in the Configure method the registration of ViewModels to:
// register view models
builder.RegisterAssemblyTypes(AssemblySource.Instance.ToArray())
// must be a type with a name that ends with ViewModel
.Where(type => type.Name.EndsWith("ViewModel"))
// must be in a namespace ending with ViewModels
.Where(type => EnforceNamespaceConvention ? (!(string.IsNullOrWhiteSpace(type.Namespace)) && type.Namespace.EndsWith("ViewModels")) : true)
// must implement INotifyPropertyChanged (deriving from PropertyChangedBase will statisfy this)
////.Where(type => type.GetInterface(ViewModelBaseType.Name, false) != null)
.Where(type => ViewModelBaseType.IsAssignableFrom(type))
// registered as self
.AsSelf()
// always create a new one
.InstancePerDependency();
The text was updated successfully, but these errors were encountered: