title: What is the best method to load Views dynamically from a Navigation control in Prism
body: <p>I've implemented navigation through my application using a Menu control which publish an event using EventAggregator on click of menu item. Something like as shown below, </p>
  
  <pre><code>this.eventAggregator.GetEvent&lt;ViewRequestedEvent&gt;()
                      .Publish(new BusinessObject.Model.MenuModel
                      {
                          Module = "Dashboard",
                          PresenterClass = "DashboardViewModel"
                      });
  </code></pre>
  
  <p>Most of the Modules in my application are subscriber to this event. They use a filter to subscribe only those events relevant to the Module</p>
  
  <pre><code>this.eventAggregator.GetEvent&lt;ViewRequestedEvent&gt;()
              .Subscribe(LoadViewRequest, ThreadOption.UIThread, true, i =&gt; i.Module == "Dashboard");
  </code></pre>
  
  <p>Request for View is handled like this:</p>
  
  <pre><code>private void LoadRequestedView(MenuModel menuItem)
  {
      try
      {
          IDashboardViewModel viewModel = this.container.Resolve(Type.GetType(menuItem.PresenterClass)) as IDashboardViewModel;
          this.regionManager.Regions["ViewRegion"].Add(viewModel.View);
          this.regionManager.Regions["ViewRegion"].Activate(viewModel.View);
          this.eventAggregator.GetEvent&lt;ViewNotificationEvent&gt;().Publish(menuItem.Description);
      }
      catch (ResolutionFailedException) { }
  }
  </code></pre>
  
  <p>How do you rate this implementation? If you think it sucks, help me to improve it or suggest a better alternative.</p>