This tutorial is recommended as a starting point for learning to create modules for SilverlightDesktop.
To use this tutorial you need to have Visual Studio 2008 installed and Silverlight Tools Beta 2 for Visual Studio 2008
Step #1: Install the "Install version" of SilverlightDesktop.
You do not need to use the source code version of SilverlightDesktop to make modules. In fact it complicates things. Altering the SilverlightDesktop core will also cause problems because you won't be able to upgrade your SilverlightDesktop site if you change the core source code. The proper way to enhance your SilverlightDesktop site is to create modules.
You can find help in installing SilverlightDesktop here:
Step #2: Open the SilverlightDesktop site and build it
Open Visual Studio and then open the SilverlightDesktop website by selecting File then Open Web Site...
The site will open.
From the toolbar, select Build then Build Web Site.
The site should build without errors.
Step #3: Create the HelloWorld Project
From the toolbar, select File then New Project.
In the New Project box:
On the Add Silverlight Application box:
The HelloWorld project will be created.
Double-click on the Page.xaml file to open it in the editor. Replace ALL the code with the following:
<UserControl x:Class="HelloWorld.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<Canvas x:Name="LayoutRoot" Background="White">
<TextBlock Height="Auto" Width="Auto" Canvas.Left="10" Canvas.Top="10" Text="Hello World!" TextWrapping="Wrap" FontSize="24"/>
</Canvas>
</UserControl>
From the toolbar, select Build, then Build Solution
Notice the HelloWorld.xap file is now in the ClientBin folder of the SilverlightDesktop website.
Step #4: Register the module
Navigate to the first page of the SilverlightDesktop through the web browser. Click the Login link.
Log in as an administrator.
Click the Go to Administration link.
Navigate to the Module Settings page and enter the following settings on the last line and click the Insert button.
Navigate back to the first page and then click the Go to your SilverlightDesktop link.
The Hello World button will display and when you click on it the module will show.