Sep 24, 2011 at 12:45 AM
Edited Sep 24, 2011 at 12:45 AM
I'm working on PRISM application with View-switching navigation and modules/regions.
I have 3 regions: Navigation (on top), Tabs (second one) and Main (remaining area)
Navigation on top that dinamically changes depending on modules loaded (that works)
Tabs - this is basically region that I inject 1 view into and it will visually reflect state of my navigation. All opened views will be displayed as tabs so I can click them to open view or hit "x" to dispose view. That should help users
when they want to work in "MDI" mode with different documents or modify same entity via different instances of same view. This part is not done YET, but I'm reading/re-reading PRISM 4 book and I think it should be doable.
Main region - Main region will have multiple views that basically different "windows" user interact with. I want those Views to be independent from each other in certain way. They will share same services, etc. But on UI - they should
not block one another. What I mean by that is if there is 2 different instances of "Order Entry" View - user will see 2 tabs in Tabs region and will be able to "navigate" from one to another by clicking on tabs.
Now to my question. Let's say I work with 2 Order Entries and in my current Active View (Order1) I do some action that requires Interaction - I'm presented with child window that blocks whole Visual Root. I want this Interaction (messagebox, selector screen,
etc) to be modal only to that Active view. I.E. I want to click on another tab and go to "Order2" without a problem. And then I want to go back to Order1 and see same Interaction open. I know navigation framework provides stuff like "OnNavigatingAway" but
I don't even care about that because tabs will be there.
I'm very new to Behaviors concept, every step is a pain for me :) Currently I implemented Child window using StockTraderRI code - I use "PopupRegion" on main Shell and just navigate my View's there(this code still a magic for me). I used this approach for
Login screen. I also implemented InteractionRequestTrigger from PRISM library to do simple user messages.
I'm not sure in which direction I should work/search in order to achieve:
1. Modal only to parent view (not to whole shell)
2. MVVM friendly - I mean I can open popups that have view and viewmodel
3. When user closes pop-up - want to get result