Article 3: Silverlight 2.0-download and install

Source: Internet
Author: User
1. download microsoft Silverlight Tools Beta 1 for Visual Studio 2008 54.5 MB
2. Double-click to install

3. Open vs 2008 and create a project Visual C #
Contains two items: Silverlight class library and Silverlight application.

4. Select Silverlight application and name it myfirstsilverlight.

5. Select Web application project in project type

After clicking OK, Visual Studio will create a solution for us, which contains a Silverlight client application and an ASP. NET web server application.

6. Now let's make the first hello World !!
Click page. xml.

EnterCode~~

<Grid X: Name = "layoutroot" background = "white">
<Button X: Name = "button1" content = "click I'll try" width = "100" Height = "50" Click = "button#click"/>
</GRID>

When clicking is input, click Create event processing.Program
Vs automatically creates an event processing function in our background code file.

7. Enter the code in page. XAML. CD.

Using System;
Using System. Collections. Generic;
Using System. LINQ;
Using System. windows;
Using System. Windows. controls;
Using System. Windows. documents;
Using System. Windows. input;
Using System. Windows. Media;
Using System. Windows. Media. animation;
Using System. Windows. shapes;

NamespaceMyfirstsilverlight
{
Public Partial ClassPage: usercontrol
{
PublicPage ()
{
Initializecomponent ();
}

Private VoidButton#click (ObjectSender, routedeventargs E)
{
Button1.content= "Hello world !!";
}
}
}

8. Run ~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.