views:

431

answers:

2

I'm building a silverlight applicate thats quite big, it also requires users to login. I'm trying to work how to show a login form (username & password) before the rest of the silverlight application is loaded. So the user will see username & password which they can start entering there information, while the rest of the application is downloaded. Can anyone provide info or examples of how to achieve this ?

+1  A: 

The best way to do this is with the Javascript API for Silverlight because you can't use managed code until the XAP file has loaded. Here's the example from Microsoft: http://msdn.microsoft.com/en-us/library/cc903962(VS.95).aspx

Gabe
A: 

As gabe points out you might be able to use the Javascript API to display a login screen as part of the standard splash screen operation in Silverlight. However I wouldn't recommend it. What happens if the user doesn't enter their details before the XAP has loaded?

I must admit I wonder whether this is really necessary. If you configure cache headers correctly on the XAP then subsequent visits to your application will should not have any significant download time.

Additionally if you use application library caching you can reduce the size of the XAP so that updates to the XAP will result in smaller downloads for existing clients.

Hence only first time users (or users that have cleared their cache or are returning after a long period) will see the splash screen for any extended period of time.

AnthonyWJones