silverlightsilverlight-4.0silverlight-toolkitwcf-ria-services

Silverlight 4: Business Application Template


I am developing a Silverlight 4 application which is based upon Business Application Template.

I am interested to ask user to login and display a login form as soon as user arrives to my site. I need to makes sure that the user cannot see/navigate to any other page of the application until he/she logs in.

How can I achieve this functionality?


Solution

  • How about adding the following in your Home.xaml.cs.

            LoginRegistrationWindow loginWindow = new LoginRegistrationWindow();
            loginWindow.Show();
    

    This will just prompt the user. You can check the status of whether he is logged on or not using the code in LoginStatus.xaml.cs