Injecting into View possible / In-page navigation?

Jan 3, 2015 at 5:56 PM
Edited Jan 4, 2015 at 2:11 PM
Hello,

I am trying to integrate Prism in a Windows Phone 8.1 App, and got most of the stuff working so far, but can't get two things to work.
  1. I need a way to inject Services (i..e. EventAggregator) into the ViewModels do do certain View related operations (in concrete: Open/Close a DrawerLayout Usercontrol, in Particular: https://github.com/amarmesic/windows-phone-navigation-drawer). In order to decouple the view from ViewModels, and be able to open/close the drawer from code, I fire an Event with the EventAggregator.

    It works so far, but I can't inject the EventAggregator into the View class. Prism always resolves it using the default constructor. For a workaround I have the event aggregator as public property of App class, but I am not happy with it and while with this single case it may be somehow acceptable, for other cases it may not be acceptable to make public properties in the App class
  2. I'd like to have a single page app, means: I want one main Page (with top bar and DrawerLayout as main navigation) and when I "navigate" to a new Page, that it gets instantiated within a section of the MainPage (similar to Region Manager in Prism for WPF Desktop Apps)
This do not seem to be there out of box and I am not sure which way to go.
DataTemplates with DataType doesn't work in WinPhone 8.1 Apps. I also considered using DataTemplateSelector which could work, but I'd like to avoid using DataTemplates too much.

Any idea how to solve this?
Feb 15, 2015 at 2:18 PM
No one having an solution for it?