C# ASP.NET ADO.NET JAVASCRIPT JQUERY AJAX SILVERLIGHT WPF
C# OOPS HTML&CSS DHTML ASP.NET ADO.NET JAVASCRIPT JQUERY AJAX SILVERLIGHT MVVM WPF SQL SERVER Photoshop Dreamweaver Flash Illustrator
Blog Archive
Limitations of Silverlight and flash
Limitations of Silverlight and flash
|
Silverlight |
Flash |
|
| Now, we got moonlight for Linux user | This limitation doesn’t exist with Flash. | |
| Silverlight will (naturally) be using the WMV and Silverlight will add to the use of the WMV file format. | Flash Video turned Flash into a mechanism for delivering media with far more potential than any other solution that is .flv. | |
| Now, we are able to read the data from web services (including RESTful service), XML from URL. Silverlight 2 supports Socket communication too. | Even flash is also lacking this area. Flash can read data source in terms of XML or text from some URL and can use it. Same thing silverlight also can read. | |
| The standard controls are included in Silverlight 2 beta1. | Flash has rich set of control library. | |
| Once the accessibility features are provided with Silverlight versions, any existing test tools that support driving UI through Accessibility will be fully enabled to automate Silverlight applications | Flash test tools are already in place. | |
| Silverlight 1.0 does not support GIF-file format. | Support all image formats. | |
| Webcam and Microphone support it not there. | Flash supports it. | |
| Built in file upload/download support is not available. | Inbuilt Upload/download support is there. | |
| The performance of Silverlight and Flash will be nearly the same. While Silverlight is using XAML as description language in a non-compressed format size of Silverlight component is large.In practical implementation of similar component in Flash and Silverlight it has found that size of Silverlight component is approximately 10-20 times larger than Flash component. | Size of flash component is smaller. | |
| We got .xap now. but there are a number of people who like to get XAML with managed code. (SL 1.1 Alpha style) | Flash ships in single component that is .swf. Images/video/sounds also incorporated in single .swf package. | |
| Silverlight 2 supports Socket communication too. | Flash allows creating XML Socket object. | |
| It has found in practical implementation of image animation, at some extent flickering occurs on image. | To avoid this type of flickering in flash, refresh layout or cache bitmap functionalities are available. | |
| It has found in practical implementation of video play, audio may start playing before showing movie on screen. It has also found video can still continue to play after redirecting to other page. It may be it is bug of current beta release. | Flash doesn’t face these types of issues. | |
| XPF or XBAP is already there for that. | Flash can be played as Windows application also by downloading player for it. Flash can be also packaged as .exe which can be deploying standalone. | |
| Silverlight is new in market and required time to get acceptance in market. | Flash is exist from many years and have strong acceptance in market. | |
| Can’t do sound processing. | With some media file sound processing can possible. | |
Silverlight Feature comparison with Flash Features
Silverlight Feature comparison with Flash Features
|
Silverllight |
Flash |
| Animation - Silverlight supports the WPF animation model, which is not only time based instead of frame based, but lets you define the start and end conditions and it will figure out how to get there for you. No need to deal with matrixes like in flash. Also no need to calculate positions on various frames. It just works. | The animation model is frame based. |
| Silverlight uses XAML. XAML is text based and can be output using a simple XML object. | Flash stores its shapes using binary shape records. In order to write shape definitions, you will need to either license a 3rd party Flash file format SDK, or build your own. It isn’t too difficult, but it does require a bit of a learning curve. |
| The debugging with Silverlight is simpler than with flash. | The debugging with flash is harder than Silverlight. |
| Silverlight lets you embed true type font information directly into your projects, and download that information with the web client object. Downloader is no longer available but we have web client. | Dealing with fonts is fairly complex with flash. |
| XAML is declarative while ActionScript is imperative. Using imperative languages to build UIs goes back to the early days of DOS and Windows, when developers had to manage all of the API nuances when interacting with graphical panes. | ActionScript is an imperative language, which brings itself the pitfalls of imperative languages when compared with declarative languages. |
| Additional Support for mobile devices with desktop and desktop browsers:Silverlight is supported by Windows mobile device as part of a new service that the NBL have built. Silverlight applications and media streaming can be run on a mobile phone - so Silverlight even at this stage is about more than just the desktop browser and desktop market. Silverlight may be seen soon on the Symbian OS too. | Flash is not spread as across the vast majority of both desktops and mobiles platforms, as compared to Silverlight. Flash requires Flash Lite preinstalled on mobile devices. |
| Silverlight does not require video codec to run industry standard videos like .WMV | Flash requires video codec to run .WMV videos. |
| Silverlight supports scalable video formats from HD to mobile. | Flash does not support scalable video formats from HD to mobile |
| Silverlight supports Hardware-assisted editing and encoding solutions. | Flash does not support Hardware-assisted editing and encoding solutions. |
| Silverlight provides End-to-end server and application platform. | Flash does not provide End-to-end server and application platform. |
| Media server licensing is cheaper than flash. | Media server licensing is costier than Silverlight. |
| Silverlight supports Scalable full screen video. | Flash does not support Scalable full screen video. |
How to Add XML File in Your Silverlight Project
How to Add XML File in Your Silverlight Project
Add Xml File named as Employee.xml and write the code given below

.XAML Code: Write this code in MainPage.xaml
<UserControl x:Class="SilverlightApplication14.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<ListBox x:Name="EmployeeList" Width="400" Height="200"
SelectionChanged="EmployeeList_SelectionChanged" />
</Grid>
</UserControl>
|
.CS Code: Write this code in MainPage.xaml.cs page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
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;
using System.Xml;
namespace SilverlightApplication14
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
PopulateEmployeeList();
}
private void PopulateEmployeeList()
{
XmlReader reader = XmlReader.Create("Employee.xml");
reader.MoveToContent();
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element && reader.Name
|
Run the Silverlight Application

3 Pixel Shader Effects in Silverlight
3 Pixel Shader Effects in Silverlight
Write below code in your MainPage.xaml
<UserControl x:Class="SilverlightApplication14.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Margin="8" Grid.Column="0">
<TextBlock Text="(Hi, Dear) A Drop Shadow!" FontSize="20">
<TextBlock.Effect>
<DropShadowEffect />
</TextBlock.Effect></TextBlock>
<TextBlock Text="(Helloooo) A Slight Drop Shadow!" FontSize="20">
<TextBlock.Effect>
<DropShadowEffect ShadowDepth="2" />
</TextBlock.Effect></TextBlock>
<TextBlock Text="(Good Bye) Blur Effect!" FontSize="20">
<TextBlock.Effect><BlurEffect />
</TextBlock.Effect></TextBlock>
</StackPanel></Grid></UserControl>
|
The Design page shown like

Run the Silverlight Application

Rotate Image in 3D direction using Silverlight
Rotate Image in 3D direction using Silverlight
Add Three ToggelButton and an image in your Project

Write below code in your MainPage.xaml.
<UserControl x:Class="SilverlightApplication14.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<Grid.Resources><Storyboard x:Name="RotateZStoryBoard">
<DoubleAnimation Storyboard.TargetName="rotation"
Storyboard.TargetProperty="RotationZ" From="0.0" To="360.0" Duration="0:0:10"
|
The Design shown like:

MainPge.xaml.cs Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
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;
using System.Xml;
namespace SilverlightApplication14
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private void rotateX_Click(object sender, RoutedEventArgs e)
{
if (rotateX.IsChecked.Value)
{
RotateXStoryBoard.Begin();
}
else
{
RotateXStoryBoard.Stop();
}
}
private void rotateY_Click(object sender, RoutedEventArgs e)
{
if (rotateY.IsChecked.Value)
{
RotateYStoryBoard.Begin();
}
else
{
RotateYStoryBoard.Stop();
}
}
private void rotateZ_Click(object sender, RoutedEventArgs e)
{
if (rotateZ.IsChecked.Value)
{
RotateZStoryBoard.Begin();
}
else
{
RotateZStoryBoard.Stop();
}
}
}
}
|
Run Your Silverlight Aplication (Click on Rotate Z-Axis)

First Application of Silverlight
Step 1: Open a New Project.

Step 2: Select a Silverlight Application and press OK

Step 3: At beginning we take a example of Canvas Control. Drag a canvas control and TextBlock control from ToolBox. you can move these as your choice.

Design Code:
<UserControl x:Class="SilverlightApplication8.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Canvas x:Name="canvas1">
<TextBlock Canvas.Left="10" Canvas.Top="10" Height="23" Name="textBlock1"
|
Step 4: Run the application

Silverlight 2.0
Silverlight 2.0
Silverlight 2.0 includes a version of the .NET Framework, with the full Common Language Runtime as .NET Framework 3.0; so it can execute any .NET language including VB.NET and C# code. Unlike the CLR included with .NET Framework, multiple instances of the CoreCLR included in Silverlight can be hosted in one process. With this, the XAML layout markup file (.xaml file) can be augmented by code-behind code, written in any .NET language, which contains the programming logic.
This version ships with more than 30 UI
controls(including TextBox, CheckBox, Slider, ScrollViewer, and Calendar
controls), for two-way databinding support, automated layout management (by
means of StackPanel, Grid etc) as well as data-manipulation controls, such as
DataGrid and ListBox. UI controls are skinnable using a template-based approach.
Main features of Silverlight 2.0
- A built-in CLR engine that delivers a super high performance execution environment for the browser.
- Silverlight uses the same core CLR engine that we ship with the full .NET Framework.
- Silverlight includes a rich framework library of built-in classes that you can use to develop browser-based applications.
- Silverlight includes support for a WPF UI programming model. The Silverlight 1.1 Alpha enables you to program your UI with managed code/event handlers, and supports the ability to define and use encapsulated UI controls.
- Silverlight provides a managed HTML DOM API that enables you to program the HTML of a browser using any .NET language.
- Silverlight doesn't require ASP.NET to be used on the backend web-server (meaning you could use Silverlight with with PHP on Linux if you wanted to).
- Silverlight 2 includes Deep Zoom, a technology derived from Microsoft Live Labs Seadragon. It allows users to zoom into, or out of, an image (or a collage of images), with smooth transitions, using the mouse wheel. The images can scale from 2 or 3 megapixels in resolution into the gigapixel range, but the user need not wait for it to be downloaded entirely; rather, Silverlight downloads only the parts in view, optimized for the zoom level being viewed.
- Silverlight 2 also allows limited filesystem access to Silverlight applications. It can use the operating system's native file dialog box to browse to any file (to which the user has access).
Silverlight 1.0
Silverlight 1.0
Silverlight 1.0 consists of the core presentation
framework, which is responsible for UI, interactivity and user input, basic UI
controls, graphics and animation, media playback, DRM support, and DOM
integration.
Main features of Silverlight 1.0
- Built-in codec support for playing VC-1 and WMV video, and MP3 and WMA audio within a browser.
- Silverlight supports the ability to progressively download and play media content from any web-server.
- Silverlight also optionally supports built-in media streaming.
- Silverlight enables you to create rich UI and animations, and blend vector graphics with HTML to create compelling content experiences.
- Silverlight makes it easy to build rich video player interactive experiences.
Why Silverlight?
Why
Silverlight?
Here is the list of advantage why we should go with Silverlight over the Flash
and other technologies already available:
-
Support of .NET framework - if you are already .NET developer it is easy to start programming on Silverlight.
-
Support of Managed code - you can write programming in your favorite language which .NET CLR supports like C#,VB.NET, Dynamic languages (IronPython, IronRuby).
-
Better development tools -Visual Studio 2010, Expression Blend.
-
Large community- available lot of learning resource as compare to Flash technology.
-
Integration with Enterprise based technologies like WPF, LINQ etc.
How Silverlight would change the Web
- Highest Quality Video Experience : prepare to see some of the best quality videos you have seen in your life, all embedded in highly graphical websites. The same research and technology that was used for VC-1, the codec that powers BluRay and HD DVD, is used by Microsoft today with its streaming media technologies.
- Cross-Platform, Cross-Browser : Finally build web applications that work on any browser, and on any operating system. At release, Silverlight will work with Mac as well as Windows! The Mono project has also already promised support for Linux!.
- Developers and Graphic Designers can play together : Developers familiar with Visual Studio, Microsoft.net will be able to develop amazing Silverlight applications very quickly, and they will work on Mac's and Windows. Developers will finally be able to strictly focus on the back end of the application core, while leaving the visuals to the Graphic Design team using the power of XAML.
- Cheaper : Silverlight is now the most inexpensive way to stream video files over the internet at the best quality possible. Licensing is dead simple, all you need is IIS in Windows Server, and you’re done.
- Support for 3rd Party Languages : Using the power of the new Dynamic Language Runtime, developers will now be able to use Ruby, Python, and EcmaScript! This means a Ruby developer can develop Silverlight applications, and leverage the .net Framework
- Cross-Platform, Cross-Browser Remote Debugging : If you are in the need to debug an application running on a Mac, no problem! You can now set breakpoints, step into/over code, have immediate windows, and all that other good stuff that Visual Studio provides.
- The best development environment on the planet : Visual Studio is an award winning development platform! As it continues to constantly evolve, so will Silverlight!
- Silverlight offers copy protection : Have you noticed how easy it is to download YouTube videos to your computer, and save them for later viewing ? Silverlight will finally have the features enabling content providers complete control over their rich media content! Streaming television, new indie broadcast stations, all will now be possible!
- Extreme Speed :There
is a dramatic improvement in speed for AJAX-enabled websites that begin to use
Silverlight, leveraging the Microsoft .net framework
Introduction of SilverLight
What is Silverlight?
-
Silverlight is the new Microsoft technology on web platform for Rich Internet Applications (RIA) launched by Microsoft in 2007
-
Silverlight supports multiple Operating Systems called cross-platform technology, which includes Windows family of OS, Mac, and Linux with moonlight technology (Moonlight is an open source implementation of Silverlight, primarily for Linux and other Unix/X11 based operating systems)
-
Silverlight is also supports multiple devices called cross-device technology, which include mobile devices to desktop browsers to 720p HDTV video modes etc
Silverlight is a browser plug-in approximately 4MB in size, it is client side free software for easy and fast less than 10 sec one time installation available for any client side browsers -
Silverlight supports the display of high-definition video files, and sending them over the Net
-
Silverlight applications are delivered to a browser in a text-based markup language called XAML. XAML is a declarative markup language that you can use to define the UI elements for your Silverlight-based application
-
Silverlight is considered as a competitor to Adobe's flash technology of the design goals of the Silverlight technology is to fill the gap between windows application and web application in terms of creating Graphical User Interface (GUI). So far web developers were not able to make client happy in terms of UI, but now web developer will be able to full fill this with the help of Silverlight technology
Platforms Silverlight supports?
-
Mac OS
-
Windows Vista
-
Windows XP SP2
-
Windows 2000
-
Windows Server 2003
-
Linux (Moonlight)
System requirements for Silverlight
The system requirements for Microsoft Silverlight and associated technologies are listed below.
-
Windows
-
Operating System: Windows 7,Windows Vista; Windows XP Service Pack 2
-
Intel Pentium III 450MHz or faster processor (or equivalent)
-
128MB of RAM
-
Mac OS
-
Operating System: Apple Mac OS X 10.4.8 or above
-
Intel Core Duo 1.83GHz or faster processor
-
128MB of RAM
-
Linux
-
Moonlight
Silverlight Blog Content
- Introduction of silverlight
- Why Silverlight?
- Silverlight 1.0
- Silverlight 2.0
- First Application of Silverlight
- Rotate Image in 3D direction using Silverlight
- 3 Pixel Shader Effects in Silverlight
- How to Add XML File in Your Silverlight Project
- Silverlight Feature comparison with Flash Features
- Limitations of Silverlight and flash









