New Silverlight 4 Video Tutorial: How to make an Out Of Browser SL4 Template Project


Whenever you need to make a new Silverlight 4 Out Of Browser (OOB) application you have to do a few things before you even get started. You need to make an Install Button, check for updates and inform the user to restart the applications if in fact updates have been installed.  In this video I show you how to make a SL4 OOB template that can allow you to do these mundane tasks in seconds when creating a new OOB application.

Video: http://tinyurl.com/yzv8b6r

Source Code: http://tinyurl.com/yzmmma7

Enjoy!

Follow me on Twitter: victorgaudioso

Sign up for my Silverlight Video Mailing List (email addresses will never be shown and never be sent any advertisements).  Just email wpfauthor at gmail dot com with the subject line “Silverlight Email List”

About these ads
  1. Victor.. couple of things.

    You did not elaborate on the ‘issues’ with, I guess, putting things in the Loaded event (from what I was able to gather from the tut).

    Also, I find it better to put this code in the App.xaml.cs file. Users put their code in the MainPage.xaml.cs file.. so just to keep things separate, I put this code in the App file.

    I did not get why you need to provide elevated permissions to check for installs. Is this a SL requirement or did you just want to show how to provide elevated perm for an OOB?

    Arun

  2. Hello Arun, I put events in a loaded handler because sometimes the events can be “skipped” over and ignored because the initialization has not completed. As for putting things in App.xaml.cs; I am not sure what you are talking about. It is not possible to raise a Click event or handle it for a Button located in MainPage.xaml in App.xaml.cs. If there is please show me how. Also, if there is, why would you want to do it that way?

  3. Hi Victor,

    The ‘skipped’ argument makes complete sense.

    I used App.xaml.cs only to check the updates only. Not for the ‘Install’ feature. I totally missed that point. For your case, the code needs to exist in the MainPage.xaml.cs file.

    My questions/concerns have been answered.. thnx pal.

  4. Ahh, check for updates in App.xaml.cs, that makes sense. I am glad you found your answers :)

  5. Hi Victor,
    You get the install screen again because you first installed the OOB app right from the file system (C:\Projects2009\SL4\Tutorials… in your machine) then in Blend it runs in localhost:13045. This is a different Source URI so that’s why it allows the installation (as far as it knows, they’re both different apps).
    Cheers!

    • Jim Wilson
    • May 11th, 2010

    Excellent video. Thank you!

    • reinier
    • May 22nd, 2010

    Hi, great tutorial vid. It’s not really a template though (as in, create new project -> Silverlight OOB Template), more of a recipe. In any case very useful.

    I was wondering. What changes need to be made to this ‘template/recipe’ in order to create an OOB project which can both run OOB and in the browser? (But where the OOB version has some special abilities the in browser version doesn’t have)

    thanks

    Reinier

    • reinier
    • May 22nd, 2010

    A second comment: I now constantly have this button ‘install application’ on my screen, and it obscures the content I’m editing. I’ve set the grid to have a default value of’ collapsed’ but in the editor this does not have any effect.

    What is the optimal way to have this button rectangle and grid in there, but not have it in my way all the time while editing and building the project?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: