Blue Theme Orange Theme Green Theme Red Theme
 
Home | Forums | Videos | Photos | Blogs | Beginners | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
6 Months Free & No Setup Fees ASP.NET Hosting!
Search :       Advanced Search »
Home » Silverlight » Chapter I: Introducing Silverlight

Chapter I: Introducing Silverlight

If you are already a .NET developer, you will be in familiar territory after learning XAML and its features. The correspondence of XAML to classes in .NET is a major strength, and the tool support built around XAML for designers and developers is strong and growing.

Technologies: Silverlight
Author Name: Jeff Scanlon
Total downloads : 0
Total page views :  7452
Rating :
 0/5
This article has been rated :  0 times
  Add to Technorati Add to Technorati    Digg This Digg This    Add to del.icio.us Add to del.icio.us
    Rate this article Read/Post comments Support Us   Printable Version 

Chapter Contents
1. Page I: Introducing Silverlight
2. Page II: The History of Silverlight
3. Page II: The History of Silverlight
4. Page III: Creating Your First Application
5. Page IV: Creating Your First Application (cont...)
6. Page V: Creating Your First Application (cont...)
7. Page VI: Summary

Team Foundation Server Hosting
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 

For the purpose of the examples in this book, it does not matter if you use a web site or a web application project; however, web application projects are better for eventual deployment since they contain a project file suitable for MSBuild.

Click OK, and the Solution Explorer will show two projects: the Silverlight application (SilverlightApplication1) and the web site supporting it (SilverlightApplication1_Web). If you now build the application, the Silverlight application is built to a XAP file that is automatically copied to the ClientBin folder within the web site. This XAP file contains the Silverlight application and will be downloaded by the client when it visits the web site.

If you now start the development server in Visual Studio (by pressing F5 or Ctrl+F5), you will see the Silverlight application start. If, however, you create a new web site in IIS, point the document root to SilverlightApplication1_Web, and navigate to this site, you will get a 404 error when trying to load the Silverlight application in your browser. What's going on? IIS must know about the new file extension .xap. You accomplish this by adding a new MIME type to either the root of IIS or to the specific web site you created. The file extension is .xap and the MIME type is application/x-silverlight-app.

Now let's take a look at Expression Blend, a tool used to lay out user interface controls and create animations in WPF and Silverlight. Without closing Visual Studio, start Blend, go to File>>Open>>Project/Solution, and navigate to the solution file created in Visual Studio (in C:\book\examples\SilverlightApplication1 if you used the same directory structure).

The top-right portion of Blend is devoted to managing the project files (like the Solution Explorer in Visual Studio); properties for various user interface elements; and resources, which include style templates, and animation storyboards, stored in XAML. Double-click Page.xaml to open this XAML page in the designer (see Figure 1-3).

Figure 1-3. The Project Property pane in Expression Blend

Along the left side of the Blend screen is the toolbox. This provides access to both layout and input controls, and several tools used to modify the user interface, such as a paint bucket and a transform tool for brushes. Hold down the left mouse button when selecting any icon with a white triangle in the lower-right-hand corner and more tools will expand from it.

Figure 1-4 shows an example when clicking the Button icon (which looks like a mouse cursor hovering over a rounded rectangle).

Figure 1-4. The control toolbox in Expression Blend

The Objects and Timeline area to the immediate right of the toolbox provides a place to create and manage animation storyboards, but more importantly for us right now, it shows the object hierarchy in XAML. After creating our application, we see [UserControl] and LayoutRoot. Click [UserControl] to highlight it and then click Properties in the top-right portion of the screen. The control with the gray highlight is the control that shows up in the Properties pane (see Figure 1-5).

Total Pages : 7 34567


        Rate this article Read/Post comments Support Us   Printable Version
 Book Detail
Book Title : Accelerated Silverlight 2
Author: Jeff Scanlon
Publisher: Apress
Price: 39.99 US$
EBook Price: 27.99 US$
Publisher Home Page: http://www.apress.com
Book Url: http://www.c-sharpcorner.com/Ebooks/Detail.aspx?EbookID=47
 Post a new question or comment about this article
Subject:
Comment:
 [Top] Rate this article:-
Looking for C# Consulting?
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional consulting company, our consultants are well-known experts in .NET and many of them are MVPs, authors, and trainers. We specialize in Microsoft .NET development and utilize Agile Development and Extreme Programming practices to provide fast pace quick turnaround results. Our software development model is a mix of Agile Development, traditional SDLC, and Waterfall models.
Click here to learn more about C# Consulting.
Latest Comments:
Subject Posted By Posted On
Support Us
Tell your friends about us
Is this article is a Bad Submission report us here
Submit articles, tutorials, and tips
Help by answering questions on our discussion forums
Help us correct errors and broken links
Looking for a job? Post your resume here
Looking for developers? Post your job here

6 Months Free & No Setup Fees ASP.NET Hosting!
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.