Inside Silverlight 2: Part 2

| Comments

Inside AppManifest.xaml

The file contains the following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
><Deployment xmlns="

http://schemas.microsoft.com/client/2007/deployment"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

EntryPointAssembly="HelloSilverlightApp"

EntryPointType="HelloSilverlightApp.App"

RuntimeVersion="2.0.31005.0">

  <Deployment.Parts>

    <AssemblyPart x:Name="HelloSilverlightApp"

Source="HelloSilverlightApp.dll" />

  </Deployment.Parts>

</Deployment>

The manifest specifies the entry point assembly which should be loaded by the Silverlight host and within the assembly it requires a type derived from System.Windows.Application for start executing the application.

Here, the assembly is “HelloSilverlightApp.dll” and type is “App” in the namespace HelloSilverlightApp.

Warning: System.Windows.dll is part of Silverlight and not the one we used for WinForm development.

I read in some web sites those explained that XAP also contains a set of required Silverlight assemblies which are needed by this application. But I tried with lot of examples, the XAP contains application’s assembly and this manifest. Need to check.

Inside HelloSilverlightApp.dll Assembly

It contains two parts:

  1. The typical .NET type declaration of specific Siverlight application’s App and one or more Page. In this example,

    1. HelloSilverlightApp.App

    2. HelloSilverlightApp.Page

  2. Resource: HelloSilverlightApp.g.resources. It contains the declarative artifacts of this application:

    1. page.xaml

    2. app.xaml