Silverlight – 02 :The first Silverlight Application
来源:互联网 发布:linux reset nic 编辑:程序博客网 时间:2024/06/01 15:35
You can use vs2010 or Expression Blend to create Silverlight projects or modify existing projects.A Silverlight application project is created by using the Silverlight Application project template. Use the following steps to create a new Silverlight application project.
-
Start Visual Studio 2010.On the File menu, click New and then Project. The New Project dialog box appears.In the Installed Templates pane, expand the Visual C# or the Visual Basic node and select Silverlight. In the list of templates, select Silverlight Application. The following illustration shows an example of the Silverlight project templates.
-
Specify a name and a location for the application and then click OK.The New Silverlight Application dialog box appears as shown in the following illustration.
-
Select a method for hosting your Silverlight application.Uncheck the Host the Silverlight application in a new Web site check box if you do not want to use a Web site to host your Silverlight application. Instead, an HTML test page will be generated to host your application.
-
Check the Host the Silverlight application in a new Web site check box if you want to add a separate ASP.NET Web site or ASP.NET Web Application Project to your solution to host the Silverlight application. If you select this option, you must also specify the New Web project name and New Web Project Type.
From the Silverlight Version drop-down list, select the version of Silverlight that you want to target.Click the OK button.
To build the Silverlight application project, in the Build menu, click Build Solution.
To debug the Silverlight application project, in the Debug menu, click Start Debugging.
To run the Silverlight application project, in the Debug menu, click Start Without Debugging.
Silverlight Application Project Files
A Silverlight application project contains the following configuration, assembly references, and code files:
AppManifest.xml : This is the application manifest file that is required to generate the application package. You must not edit this file.
AssemblyInfo.cs or AssemblyInfo.vb : This file contains the name and version metadata that is embedded into the generated assembly.
.xap file : This is the Silverlight application package. It is generated when the Silverlight application project is built. An application package is a compressed zip file that has a .xap file extension and contains all the files that you need to start your application. For more information about a Silverlight application package, see Application Structure.
A Silverlight application project contains references to the following assemblies:
mscorlib.dll
System.dll
System.Core.dll
System.Net.dll
System.Windows.dll
System.Windows.Browser.dll
System.Xml.dll
MainPage files : The MainPage class is used to create the user interface for the Silverlight application. The MainPage class derives from UserControl. You can implement the MainPage class by using MainPage.xaml for XAML markup and MainPage.xaml.cs or MainPage.xaml.vb for the code-behind.
App files : The App class is required by a Silverlight application to display the application user interface. The App class is implemented by using App.xaml and App.xaml.cs or App.xaml.vb. The App class is instantiated by the Silverlight plug-in after the application package (.xap file) is created.
Test Page : A single HTML page (TestPage.html) is generated to host your application if you do not check the Host the Silverlight application in a new Web site check box in the New Silverlight Application dialog box.
- Silverlight – 02 :The first Silverlight Application
- Error 2104 Silverlight Could Not download the Silverlight Application
- Could not download the Silverlight application
- SilverLight Cache First Exploration
- Fix for Could not download the Silverlight application error
- Communicate with different Silverlight Application in the browser
- Solution of Could not download the Silverlight application
- Could not download the Silverlight application. Check web server settings
- Silverlight
- silverlight
- Silverlight
- silverlight
- Silverlight
- silverlight
- silverlight
- silverlight
- silverlight
- Silverlight
- AODV获取所有的邻居节点ID方法
- I/O 流分类
- 邮件服务器地址
- POJ 2840 Big Clock 解题报告
- win7下 itunes中 拔出数据线 蓝屏
- Silverlight – 02 :The first Silverlight Application
- PHP5.3新特性
- cmd中文件夹的命名注意事项
- 两个单向链表,找出它们的第一个公共结点
- netlink2
- 第一个帖子 请高手指点
- 表达式语言(EL)
- layout中设置图片自适应大小,并且设置最大宽高
- java入门(2)-正则表达式