title: Confused about navigation in modal / non modal windows in prism - Need guidance
body: <p>I am all confused going about implementing this in Prism.  My scenario in one liner is how to achieve Prism Navigation (regionManager.RequestNavigate) in a view that is shown as a separate modal/non modal window over the main window.</p>
  
  <p>Taking some code from <a href="http://www.codeproject.com/Articles/36745/Showing-Dialogs-When-Using-the-MVVM-Pattern" rel="nofollow">this article</a>, I am now able to show a separate Window, but I am very confused about navigating in the regions of the window shown. I will try to put up some code below to clarify my situation.</p>
  
  <p>This code in <strong>RoomBandViewModel</strong> launches dialog</p>
  
  <pre><code>private void ManageRoomFacility() {
      dialogService.ShowDialog&lt;RoomFacilityMainWindowView&gt;(this, container.Resolve&lt;RoomFacilityMainWindowView&gt;());
      regionManager.RequestNavigate(RegionNames.Main_Region, new Uri("RoomFacilityMainView", UriKind.Relative));
  </code></pre>
  
  <p>As can be seen, I launch the Dialog which shows the View (code shown below), and then tries to navigate in One of the region of the View</p>
  
  <p>The popup window <strong>RoomFacilityMainWindowView</strong></p>
  
  <pre><code>&lt;Window x:Class="HotelReservation.Main.View.RoomFacilities.RoomFacilityMainWindowView"
  
      &lt;view:RoomFacilityMainView 
          prism:RegionManager.RegionName="{x:Static const:RegionNames.Window_Main_Region}"/&gt;
  
  &lt;/Window&gt;
  </code></pre>
  
  <p>UserControl within window (<strong>RoomFacilityMainView</strong>)</p>
  
  <pre><code>&lt;UserControl x:Class="HotelReservation.Main.View.RoomFacilities.RoomFacilityMainView"
      &lt;Grid VerticalAlignment="Stretch" &gt;
          ...
          &lt;Border Grid.Column="0" Style="{StaticResource RegionBorderStyle}"&gt;
              &lt;StackPanel&gt;
                  &lt;TextBlock Text="Some Sample Text"/&gt;
                  &lt;ContentControl prism:RegionManager.RegionName="{x:Static const:RegionNames.Window_List_Region}"
                              /&gt;
              &lt;/StackPanel&gt;
          &lt;/Border&gt;
  
          &lt;GridSplitter Width="5" Grid.Column="1" HorizontalAlignment="Stretch" /&gt;
  
          &lt;Border Grid.Column="2" Style="{StaticResource RegionBorderStyle}" &gt;
              &lt;TabControl x:Name="Items" Margin="5" prism:RegionManager.RegionName="{x:Static const:RegionNames.Window_Edit_Region}"  /&gt;
          &lt;/Border&gt;
  
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>Code Behind (<strong>RoomFacilityMainView.xaml.cs</strong>)</p>
  
  <pre><code>public partial class RoomFacilityMainView : UserControl {
  
      public RoomFacilityMainView() {
          InitializeComponent();
  
          RoomFacilityMainViewModel viewModel = this.DataContext as RoomFacilityMainViewModel;
          if (viewModel == null) {
              viewModel = ServiceLocator.Current.GetInstance&lt;RoomFacilityMainViewModel&gt;();
              this.DataContext = viewModel;
          }
      }
  }
  </code></pre>
  
  <p><strong>RoomFacilityMainViewModel</strong>
      public class RoomFacilityMainViewModel : BindableBase {</p>
  
  <pre><code>    IRegionManager regionManager;
      IUnityContainer container;
  
      public RoomFacilityMainViewModel(IRegionManager regionManager, IUnityContainer container) {
          this.regionManager = regionManager;
          this.container = container;
  
          regionManager.RequestNavigate(RegionNames.Window_List_Region, new Uri("RoomFacilityListView", UriKind.Relative));
  
      }
  }
  </code></pre>
  
  <p>With this code no navigation occurs and I just get a blank window. The Contents of the RoomFacilityListView.xaml should be displayed, but its blank.</p>
  
  <p>If the code is confusing, then please just give advice on how to navigate (use RequestNavigate) with View that has regions but shown through Dialog Service as a separate window instead of on MainWindow(Shell) .</p>