Unity - WPF MVVM Ligth - Interceptor

May 19, 2015 at 2:08 PM

I have some issue using an interceptor on Wpf MVVM Light Usercontrol.

When i try to use an interceptor on a WPF userControl i am unable to use it as window.Content.
My application display the dynamics type of the userControl instead of display the xaml part.

without interceptor :

with interceptor :

sample :
var container = new Container();
var view = container.Resolve<IAuthView>("auth");

var window = new Window();
window.Content = view;

Container :
// Working well.
this.RegisterType<IAuthView, AuthView>("auth", new InjectionConstructor(this.Resolve<IAuthViewModel>()));
// Not working.

this.RegisterType<IAuthView, AuthView>("auth", new InjectionConstructor(this.Resolve<IAuthViewModel>()), new Interceptor<InterfaceInterceptor>(), new InterceptionBehavior<LoggingInterceptionBehavior>());
nota : I think my interceptor is ok because of when i try with a non WPF UserControl it work well.
nota2 : the methods WillExecute and GetRequiredInterfaces are well called.

I search and search again on the web without result :(

Any idea ?