SilverLight Tutorial

Ratings:
(4.2)
Views: 1319
Banner-Img
Share this blog:

SilverLight Tutorials Overview

Welcome to SilverLight Tutorials. The objective of these tutorials is to gain in depth understanding of Microsoft SilverLight product. In these tutorials, we will cover topics such as SilverLight Architecture, Brushes, Layouts, Transforms, Data bindings and more.

In addition to SilverLight tutorials, we will also cover common interview questions and issues.

About SilverLight

HTML – DHTML – server side technology (ASP, ASP.net, JSP, PHP)

We know that to develop the complete websites, we use the various server side technologies like SAP, SAP.net, JSP, PHP etc……..

Almost all server side technologies will provide very good and efficient server side programming facilities to implement security or to provide state management etc.

These server side technologies also provide designing of use interface element like buttons, text boxes, list box etc.

But the designing facilities provided by these server side technologies are not efficient and do not provide very good rich user interface elements.

To overcome this drawback, always it was compulsory to depend on third party tools known as Plug ins. Like Photoshop, adobe flex, flash etc.

But when we depend on third party components efficiency and support may not be upto the mask.

To overcome such kind of problems Microsoft developed SilverLight

SilverLight  is a Plug-in Software used to provide very good designing facilities as well as support for media elements.

Using silver light we can build very good rich user interface elements

Backbone of SilverLight  is completely XAML [Extensible Application Markup language]

SilverLight  is a powerful development plat form for crating rich media applications, business applications for the

Based on Microsoft.net framework the free silver light plug in will work across the multiple browsers, devices, operating system SilverLight  will provide following facilities Extensive content Styling options Powerful communication protocols Data access facilities Light definition media Very good user interaction

SilverLight  applications can be developed quickly using Microsoft editors like web platforms like visual studios visual web developer etc.

Components of SilverLight

SilverLight  contains & components completely

.Net framework components CLR & its components XAML WPF WCF LINQ

Java script, DOM

Animations, Media elements & presentation core

SilverLight Overview

The SilverLight  is new graphical tool from Microsoft, using silver light we can implement 2D,3D Graphics and animations

The Microsoft designed silver light using Java script and XML,

The SilverLight  graphical features by default executes in the client Machine browser.

The SilverLight  is cross browser and cross platform

The SilverLight  Microsoft implemented using XAML (extensible application Markup Language), because of the Markup Language we can implement light weight graphical features in the silver light

The Microsoft created collection of controls and layouts in the SilverLight , all layouts are predefined classes, all controls are predefined objects

1

As per .net technologies every object having mainly Three features

Properties Methods Events 

 

Properties

The properties are initial features to the objects, property features we can access at design time without implementing logic, we can access at runtime with implementing the logic also.

Methods

Methods are run time features to the object, methods features we can access at runtime by implementing the logic only

Events

All .net technologies are event driven programming technologies, we have to implement total source code in the events only.

Event is an action, every event performs specific action

XAML (extensible Application markup language)

The Microsoft designed silver light using XAML, this markup language is case sensitive supports only predefined tags, in XAML every  open tag must be closed. Using XAML we can create controls, events and we can give all graphical features because of XAML we can implement rich internet applications while installing .net framework 3.5 (2008) automatically not getting silver light framework, manually we have to install silver light framework using  silver light chainer  software

While installing .net framework 4.0 (2010) auto-graphically getting silver light framework.

Creating SilverLight, button control with events

Open new SilverLight application by clicking on the file menu new project

Getting new project window with two sub windows

Project types window Templates window

From the project types window we have to select visual c# From the templates window select silverlight  Application click on - - >P

While opening the SilverLight  application asking for execution pages or Hosting pages, the Microsoft given two execution pages to the silver light.

  • HTML page
  • net webpage

To take HTML page as hosting we have to deselect the hosting  website checkbox   - - >  click on  - - > P

In the silver light application always getting main page .XAML file, this file having 3 modes

  • Design Mode
  • XAML Mode
  • Code behind window

In the design mode the Microsoft given flexible graphical features all SilverLight controls we can add on the container using graphical features.

Using XAML mode we can give all graphical features at design time we can execute some graphical features at runtime also Code behind window gives graphical features at runtime, while working with code behind window we can work with classes and all object oriented features.

For creating button control go to XAML Mode in the grid tag

<Grid X:Name = “Layout Root” Background=”white”>

<button X: Name = “b1” Height = “100” width = “300”

Content = “welcome” font size = “50”

Mouse Enter = “b1_MouseEnter”

Mouse leave = “b1­_mouse leave”>

</Button>

</Grid>

Implementing Events

Go to code behind window by right clicking on the design mode and clicking on view code

Public partial class Main page: user control

{ private void bl_Mouse enter(object sensor, Mouse event args e) { bl.font size = 50;

}

Private void bl-MOuseleve (object sender, Mouse Event Agrs e)

{ bl.fontsize = 10;

}

While executing this application getting output in the html page and generation XAP extension file

You liked the article?

Like: 0

Vote for difficulty

Current difficulty (Avg): Medium

EasyMediumHardDifficultExpert
IMPROVE ARTICLEReport Issue

About Author

Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.

Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox