Composite Command with 2 Windows

Topics: Prism v2 - WPF 3.5
Jul 31, 2009 at 1:06 PM

Hey all,

I'm having a problem with CompositeCommand in the monitorCommandActivity=true configuration.

 

I want that only the command in the active view will execute, but it can be done. the problem is:

I have some views in separate windows. Think that i'm currently work on view1 on window1, and in the other window (window2) I worked before on view6 (it is in focus on window2).

Now, when i'm leaving view1 on window1 to view2 on window1 i got the lost focus and the get focus of this 2 views. But... when I' leaving to view6 on the other window i don't get the lost focus!!!!!

That's because in window1 I'm still working on view2 (it has the focus but the window isn't active). but now, if I'm going to run the composite command, it will execute 2 commands, one of the view2 and the second is of view6. That's not what i wanted!!!

maybe i need to listen to active event on the windows?

 

Thanks for the help