S2010 Strong and fast support is really surprising. Custom Start page, multi-monitor support ... These are too many, I will not say one by one, who knows with WHO.
VS2010 integrates SILVERLIGHT3 to facilitate the development of Silverlight programs.
To establish a project:
Open vs2010, create a new project, see many options, select Silverlight
The Silverlight hosting program is created below, and you can choose
You can also select the Silverlight version.
After the project is created, do not do anything more, direct build. You'll find the project folder ClientBin files/silverlightappdemo1.xap
SILVERLIGHTAPPDEMO1.XAP is the output file that compiles the packaged SilverlightAppDemo1 project. It's just a compression.
This file contains all the files required by the Silverlight application, such as assemblies, resource files, and so on. The XAP suffix here does not have any special meaning, just the Silverlight application
The extension of the package file after the program is compiled is, in essence, a standard zip-compressed file.
To create a simple Silverlight program
Add a Silverlight control to MainPage.xaml, note that it is not added in silverlightappdemo1testpage.aspx
Writing in MainPage.xaml.cs
Private void Btnme_click ( object sender, RoutedEventArgs e)
{
this. btnme.content = "Hello!" ";
this. Btnme.background = new SolidColorBrush (colors.red);
}
You see, in Silverlight, control content is the text of the ASP.net control.
Running the project
After clicking
Conclusion
To create Silverlight in vs2010, you do not have to introduce the System.Web.Silverlight assembly in the. aspx file. Because the generated silverlight.js file will take you through the page's support for the control.
If the program does not run up, right-click the Silverlight program, properties. Add a reference to the silverlightapplication.