This project is read-only.

Authentication in a Bxf application

May 16, 2011 at 1:39 PM
Edited May 16, 2011 at 1:43 PM


We are building a Bxf-based proof-of-concept application that requires the user to login before gaining access to any of the application functionality.

Our existing apps built in WinForms display a modal splash/login form before the main UI is loaded - we would like to do something similar in Bxf.

Does anyone have any guidance and/or examples showing how this should be done in a MVVM-compliant way?

Thanks for any help.


May 16, 2011 at 3:08 PM

It depends on whether you are using WPF or Silverlight.

In WPF you can create a model dialog "region" and use that to do the login. Because that region is modal, all access to the rest of the app is automatically blocked.

Silverlight makes this harder, because there's no true modal dialog. Instead, in Silverlight you'll probably use the concept of a child window, and you'll need to wait to navigate away from that child window until the async callback from the authentication process is complete. If you use async server calls in WPF it is a similar implementation.

The Silverlight sample in the Bxf download shows how to display a child window.

In either case, the viewmodel for the dialog/child window is normally responsible for providing a Login method that is invoked to authenticate the user's credentials.