WP7 - Show a login screen for 'restriced' viewmodels

Feb 9, 2011 at 5:06 PM


I've just started using caliburn micro. It works great for most things. The only thing I can't figure out is how to show a login pop-up when an unauthenticated user tries to access a restriced screen.

I want to have a simple way to define in a view model that it requires authentication and whenever the user navigates to a screen that uses the view model I want to check if that user is authenticated and if not show a login screen or pop up.

after the user logs in he will be sent to the screen he tried to navigate to.

I'm coming from web development where this is a very standard approach you define which screens should be restricted and redirect to a login page passing the url the user tried to access in the querystring)

what's the best way to do that with caliburn micro? anyone has a good sample?


Feb 9, 2011 at 5:42 PM

You might consider building a generic Conductor specialization taking care of checking authentication on startup; this conductor should "wrap" your existing screen view model.
Depending on the authentication state the conductor can choose to display the actual screen or a login panel.

It's just a very quick tip: I hope it helps; please let me know if you need some more clarification.


Feb 9, 2011 at 7:06 PM

Thanks, I will try that