Hello Support,
Well, it's great to be back on Winforms with DevExpress' suite!
I have a question concerning how you intended IoC to work with your Winforms MVVM framework (in my case, I'm using Autofac). Consider the following code:
C#var builder = new Autofac.ContainerBuilder();
builder.RegisterType<ContactsViewModel>();
var container = builder.Build();
MVVMContextCompositionRoot.ViewModelCreate += (s, e) => {
e.ViewModel = container.ResolveOptional(e.RuntimeViewModelType);
};
Application.Run(new ShellView());
The reason I had to go with ResolveOptional is that every time a ViewModel is created, the RuntimeViewModelType is followed by an underscore and a Guid (e.g. "ContactsViewModel_8a190ac3_40c8_4888_9ed0_689a79a8682e"), which of course is not registered. Should it not be RuntimeViewModelType.BaseType (because that reports back as just "ContactsViewModel")?
Or am I misunderstanding your design intentions here? Also, should I be resolving ViewModels, or everything but ViewModels?
Thank you!