[Windows Phone 8] Full Screen Dialog

Topics: Actions & Coroutines, UI Architecture
Jan 2, 2014 at 9:54 AM
Hi Guys.

Following the question I had on This work item:
How can I create a full screen dialog on Windows Phone 8?

In short, here are the requirements:
  1. The dialog should be opened in Full-screen
  2. The dialog will be opened from a coroutine, and the coroutine should continue to execute only when the dialog is closed (Most probably with some result)
Here's what I thought:
When using the navigation service, I get a page to open 'full-screen', but I can't access the ViewModel behind it (ViewFirst), so I can't access the dialog result.

So, I'm trying to use the IWindowManager, like this:
public abstract class ShowDialogResultBase<TViewModel> : AbstractResult where TViewModel : Screen
        private IWindowManager _windowManager;
        protected TViewModel Model { get; private set; }

        public ShowDialogResultBase(IWindowManager windowManager)
            _windowManager = windowManager;

        public override void Execute(ActionExecutionContext context)
            Model = GetModel();

            Model.Deactivated += ModelDeactivated;

            Xecute.OnUIThread(() => _windowManager.ShowDialog(Model));

        protected abstract TViewModel GetModel();

        private void ModelDeactivated(object sender, DeactivationEventArgs e)
            Model.Deactivated -= ModelDeactivated;


        protected virtual void OnWindowClosed() { }
Which works great, except it doesn't open full-screen.

What am I missing?