Professional Documents
Culture Documents
Silver Light Guide
Silver Light Guide
Silverlight
Guide
Confidential Page 1 of 6
Clarion Technologies Pvt. Ltd.
TABLE OF CONTENTS
Silverlight ships with a lightweight class library which includes features such as
extensible controls, XML Web Services, networking components and LINQ APIs.
This class library is a subset of, and is considerably smaller than, .NET
Framework's Base Class Library. Silverlight code runs in a sandbox, thus
preventing the invocation of platform APIs. Silverlight can handle data in RSS
or JSON format, in addition to XML. Silverlight also includes classes for data
access over XML-based Web services, REST, WCF Services and ADO.NET Data
Services. Silverlight 2 also allows limited filesystem access to Silverlight
applications. It can use the operating system's native Open-file dialog box to
browse to any file (to which the user has access). Silverlight CoreCLR uses an
attribute-based security model, as opposed to the Code Access Security (CAS)
model of the desktop version of .NET Framework.
Silverlight 3 will feature support for H.264 video and AAC audio decoding.
BROWSER COMPATIBILITY
SILVERLIGHT CONTROLS
Silverlight 2 Beta 2 has over 3 dozen User Interface (UI) controls and the final
release will have more. .NET programmers already familiar with ASP.Net or
(especially) WPF, will find using the Silverlight controls very natural and
straight forward.
Silverlight controls were created to look great and provide extensive and
customizable functionality right out of the box. Moreover, all of the standard
controls can be modified in numerous ways to meet your needs.
For version 2 of Silverlight in Visual Studio 2008, the design surface is "read
only." That is, you can drag and drop controls into the markup (or write the
Xaml by hand) and the effects are seen immediately in the design surface, but
you cannot yet drag or otherwise manipulate controls directly in design mode.
Layout Controls
The use of layout controls is both straight-forward and essential to the creation
of Silverlight applications. Layout controls are used to manage the placement
of other controls (including other layout controls!) in your Silverlight
application. You can think of the layout controls as “containers.”
They are listed in the order of how frequently they are used. If you learn Grid
and StackPanel, you can probably program for a long time on just those two.
1. Grids
Grids (not to be confused with DataGrids) offer easy and exact placement by
providing a table-like structure. You declare rows and columns, and then place
controls into a specific row/column location (spanning across rows or columns
as needed). While you can tweak your grids to achieve very precise placement,
the basic use of grids is extremely straight forward. You typically declare a
grid, declare its rows and columns and then start placing controls into specific
cells (e.g., column 1, row 3).
StackPanels are typically combined with other layout controls. They allow you
to stack objects one on top of the other, or next to each other (like books on a
shelf). One convenience of a StackPanel is that you do not have to provide the
position of the objects held by a StackPanel, they are positioned relative to the
object declared earlier in the Stack.
3. Canvas
The Canvas layout control is the most basic, and it has been around since the
very first Silverlight versions. It provides the simple ability to absolutely
position child elements relative to the canvas' top left corner.
To see this at work, let's create our first Silverlight Application: Grid For
Layout (Refer “Silverlight_Sample_Application.doc”)
USEFUL LINKS
1) http://www.microsoft.com/silverlight/
2) http://silverlight.net/
3) http://en.wikipedia.org/wiki/Silverlight
4) http://weblogs.asp.net/scottgu/archive/2007/05/07/silverlight.aspx
5) http://download.microsoft.com/download/f/2/e/f2ecc2ad-c498-4538-
8a2c-15eb157c00a7/SL_Map_FinalNET.png