I have a MyViewModel class as follows:
public class MyViewModel : Screen, ITransientDependency
{
[ReapeatClick]
public void Save()
{
}
}
The [ReapeatClick] method attribute uses an interceptor.
In a method ShowView():
private void ShowView()
{
var vm = IoC.Get<MyViewModel>();
IWindowManager windowManager = IoC.Get<IWindowManager>();
var dialogResult = await windowManager.ShowDialogAsync(vm);
}
When obtaining the class with an interceptor using the IoC container: var vm = IoC.Get();, the type of vm becomes Castle.Proxies.MyViewModelProxy. However, the View’s name is MyView, which prevents the View from being matched with the ViewModel.
I tried the following configuration but still could not locate the View:
ViewLocator.AddNamespaceMapping("Castle.Proxies.*", _viewAssemblyName);
ViewLocator.NameTransformer.AddRule(@"ViewModelProxy$", "View");
I have a MyViewModel class as follows:
The [ReapeatClick] method attribute uses an interceptor.
In a method ShowView():
When obtaining the class with an interceptor using the IoC container: var vm = IoC.Get();, the type of vm becomes Castle.Proxies.MyViewModelProxy. However, the View’s name is MyView, which prevents the View from being matched with the ViewModel.
I tried the following configuration but still could not locate the View: