Silverlight / WPF - silverlight and wpf difference

Asked By Malik on 21-Aug-11 02:05 AM
if one person has gain master in silverlight than wiil this help him in learning wpf
Devil Scorpio replied to Malik on 21-Aug-11 02:17 AM
Hi Malik,

WPF has a more advanced and mature XAML support than Silverlight.  Silverlight used to be called (WPF /E) and is a subset of the WPF XAML design.  Therefore, it doesn't support all of the XAML keywords for graphics nor does it support all of the bindings as well and other items.  WPF is hardware accelerated and supports things like GPU shaders which Silverlight 2 does not.

Silverlight 2 does have the VisualStateManager inside Blend 2, which I think WPF needs an add-on and a tweak to work.  I think that is the only case where Silverlight 2 XAML was/is slightly ahead of WPF's.

Here is a link on XAML processing differences:

http://msdn.microsoft.com/en-us/library/cc917841(VS.95).aspx

Here is a good article on MSNMAG about designing Silverlight/WPF apps together and sharing code:

http://msdn.microsoft.com/en-us/magazine/cc895632.aspx

Devil Scorpio replied to Malik on 21-Aug-11 02:20 AM
Hi,

WPF
WPF is based off of the desktop CLR which is the full version of the CLR.

WPF is essentially the replacement to Winforms in that it is a desktop application platform built on the .Net (3+) platform.


Silverlight
Silverlight is based on a much smaller and more compact CLR which provides a great experience but does not have the full breadth of CLR features. It also has a much smaller version of the BCL.

Silverlight represents a subset of WPF that is delivered through a browser plug-in, much like Flash/Flex.

Silverlight is a subset of WPF. Once it was known as WPF/E (WPF everywhere)
Irfan Khan replied to Malik on 21-Aug-11 02:26 AM

WPF vs. Silverlight

The Windows Presentation Foundation, or WPF, is a graphical subsystem that was added as a part of the .NET Framework. It allows developers to easily develop interfaces for their Windows applications. Microsoft Silverlight is another piece of software from Microsoft that offers the same capabilities, and was intended to compete with Adobe Flash, and others that are similar. It is simply a subset of the already existing WPF. For a period of time, Silverlight was called WPF/E, with the ‘E’ standing for ‘everywhere’.

The use of WPF is limited to applications that are meant to run on the Windows operating system. You cannot build an application that is able to run on any other operating system, and even for older versions of Windows, like 95 and 98. Silverlight applications can be used on any operating system, just as long as the operating system’s host is a Windows operating system. This means that using Silverlight is much better in cases where your users are far away, and using varied operating systems.

As Silverlight was intended to be used online, certain limitations were imposed, in order to maintain its function, regardless of the operating system, and to avoid malicious programs that can damage the computer of the person browsing the site. Silverlight cannot access the resources of the local machine. Since WPF is used in applications that are meant for local use, it is aware of the operating system on which it runs, and can take advantage of that to improve its performance, and use the features that are not available in Silverlight.

3D imaging is one of the features that Silverlight is lacking. This is necessary if you want to create 3D views, and environments just like what you see in most of the newer games. WPF can fully render 3D images, since it can directly access Direct3D. Later versions of Silverlight, added 3D support, although this was not full support. It is now capable of perspective 3D.

Summary:

1. Silverlight is simply a subset of WPF.

2. Silverlight is meant to be used online, while WPF is for local use.

3. You can use Silverlight applications regardless of the operating system you use, while WPF applications are restricted to later versions of the Windows operating system.

4. Silverlight lacks access to local resources, while WPF can utilize local resources.

5. Silverlight only has perspective 3D support, while WPF is capable of full 3D images.

http://blogs.msdn.com/b/jennifer/archive/2008/05/06/when-should-i-use-wpf-vs-silverlight.aspx

http://www.infoq.com/news/2009/11/WPF-Silverlight

Riley K replied to Malik on 21-Aug-11 03:03 AM

Let's look at some of the different characteristics of each technology:

 

WPF:

  • Ships as part of the .NET Framework (version 3.0 and onward)
  • Runs as Windows application or as web "browser application" (called XBAP, for "XAML Browser Application").  Note that XBAPs run only in Internet Explorer with .NET 3.0 and in both Internet Explorer and Firefox with .NET 3.5.  
  • Runs on Windows machines only (Windows XP, Windows Server 2003, Windows Vista, and Windows Server 2008)
  • Richest functionality, including 3D graphics

Silverlight:

  • Ships independently
  • Runs in web browsers only (Internet Explorer, Firefox, Safari)
  • Runs on Windows or Mac operating systems (also on Linux via Moonlight, which is an open source implementation of Silverlight based on Mono)
  • Functionality is a subset of WPF's feature set
Cheers
Radhika roy replied to Malik on 21-Aug-11 03:08 AM

Silverlight and Windows Presentation Foundation (WPF) are 2 different products from Microsoft, but has lot of overlap. Silverlight is a sub set of WPF in terms of features and functionality.

Silverlight is a Microsoft technology, competing with Adobes Flash and is meant for developing rich browser based internet applications.

WPF is a Microsoft technology meant for developing enhanced graphics applications for desktop platform. In addition, WPF applications can be hosted on web browsers which offers rich graphics features for web applications. Web Browser Appliactions (WBA) developed on WPF technology uses XAML to host user interface for browser applications. XAML stands for eXtended Application Markup Language which is a new declarative programming model from Microsoft. XAML files are hosted as descrete files in the Web server, but are downloaded to the browsers and converted to user interface by the .NET runtime in the client browsers.

WPF runs on .NET runtime and developers can take advantage of the rich .NET Framework and WPF libraries to build really cool windows applications. WPF supports 3-D graphics, complex animations, hardware acceleration etc.

Basic difference between WPF & Silverlight is that WPF is for desktop applications & silverlight is for Web application.


Windows Presentation Foundation (WPF) and Silverlight


Microsoft has released Silverlight 1.0. There are lot example applications up. See for example this beta application showing a search UI made in Silverlight. Silverlight is often portrayed as Microsoft’s Flash-killer. Flash is important as a tool for showing rich multi-media content, but in the future, frameworks like this might be the new platform applications are based on.

Silverlight’s architecture is interesting. It includes parts of Windows Presentation Foundation (WPF), but runs on more operating systems.

First some words on WPF… WPF is Microsoft’s new GUI framework that replaces all of the old “Windows Forms” and Win32 API. It builds on a vector based and GPU-enabled drawing framework (DirectX), and adds the ability to create richer UIs than Windows Forms does. The look and feel is also new. In my view, WPF is Microsoft most important project the last years. Everybody is discussion Windows Vista, but WPF is probably more important for application developers than Vista is. WPF also runs on Windows XP, so it is not tied to Vista.

Read this and this and this to get a better understanding of WPF. Also watch this video. Even if you never plan to use WPF, knowing the technology and the concepts is useful.

WPF applications can be deployed to the desktop or run in Internet Explorer (on Windows only, as far as I know). When WPF application run in Internet Explorer they run in a sandbox, so users simply point Internet Explorer at an URL and your application appears without any installation or confirmation need. All development tools are the same (Visual Studio) when making desktop and browser-based WPF applications, and you can use the same widgets for both.

WPF running in Internet Explorer have some restrictions compared to a program running on the desktop. For example, opening new windows is not possible and communication (WCF) is not allowed. Apparently SOAP calls can be used instead.

Making a WPF application run in the browser is easy. You create a project in Visual Studio marking it as a “WPF Browser Application”. After compilation, you publish the executable to a web server. I think one idea in Visual Studio is to allow a desktop-based WPF application and the same browser-based application to be produced from the same codebase. I have not tried this yet, but this looks like a promising concept.

Back to Silverlight… Like WPF-applications can run in a browser, so do Silverlight applications. But Silverlight applications can be deployed to more platforms (OS X and Linux) and more browsers. This does however come with a cost… Like browsers-based WPF applications lose access to some functions compared to desktop applications, Silverlight applications can build on even less infrastructure. The GUI is one (of many) missing elements in Silverlight:

“ (…) it's important to note that a lot of the staple approaches you may be familiar with from building Windows Presentation Foundation (WPF) applications will not work in Silverlight, which uses only a subset of WPF's capabilities. Silverlight does not support most of the WPF component primitives, such as Buttons and TextBoxes, and it supports only one layout type: the absolute positioning layout. As a result, porting an existing WPF application to Silverlight will force a total rewrite of all the UI-related code.” (From DevX)
Of course, people are building widget libraries for Silverlight, but wouldn’t it better if WPF was fully included? There could be various reasons for not including it… One could be size, but does that really matters these days? Another reason could be that Microsoft simply does not want all other operating systems to be able to run (the new wave of) Windows programs for free.

For application developers this sums up to using one of these platforms (not counting web interfaces) when writing new software in Visual Studio:

WPF applications running on the desktop (Vista/XP) -- all OS features enabled.
WPF applications running sandboxed in Internet Explorer on Vista & XP -- missing WCF and some permissions, e.g. opening new windows.
For the two solutions above, you use same tools and frameworks. Then, for the third one you enter another world:

Silverlight running sandboxed on “major browsers” on Windows, Linux and OS X -- heavily reduced WPF (missing some 3D functions, widgets gone, etc.) Depend on other 3rd party tools for this functionality.
If you develop a Rich Internet Application, it seems like choosing between WPF and Silverlight will be an important decision that will heavily shape your project.




follow this link
Radhika roy replied to Malik on 21-Aug-11 03:16 AM

Silverlight and Windows Presentation Foundation (WPF) are 2 different products from Microsoft, 
but has lot of overlap. Silverlight is a sub set of WPF in terms of features and functionality.

Silverlight is a Microsoft technology, competing with Adobes Flash and is meant for developing rich
 browser based internet applications.

WPF is a Microsoft technology meant for developing enhanced graphics applications for desktop platform. 
In addition, WPF applications can be hosted on web browsers which offers rich graphics features for web applications. Web Browser Appliactions (WBA) developed on WPF technology uses XAML to host user interface
 for browser applications. XAML stands for eXtended Application Markup Language which is a new declarative programming model from Microsoft. XAML files are hosted as descrete files in the Web server, but are
 downloaded to the browsers and converted to user interface by the .NET runtime in the client browsers.

WPF runs on .NET runtime and developers can take advantage of the rich .NET Framework and WPF libraries to
 build really cool windows applications. WPF supports 3-D graphics, complex animations, hardware acceleration 
etc.

Basic difference between WPF & Silverlight is that WPF is for desktop applications & silverlight is for Web application.


Windows Presentation Foundation (WPF) and Silverlight


Microsoft has released Silverlight 1.0. There are lot example applications up. See for example this beta application showing a search UI made in Silverlight. Silverlight is often portrayed as Microsoft’s 
Flash-killer. Flash is important as a tool for showing rich multi-media content, but in the future,
 frameworks like this might be the new platform applications are based on.

Silverlight’s architecture is interesting. It includes parts of Windows Presentation Foundation (WPF),
 but runs on more operating systems.

First some words on WPF… WPF is Microsoft’s new GUI framework that replaces all of the old “Windows Forms”
 and Win32 API. It builds on a vector based and GPU-enabled drawing framework (DirectX), and adds the ability
 to create richer UIs than Windows Forms does. The look and feel is also new. In my view, WPF is Microsoft
 most important project the last years. Everybody is discussion Windows Vista, but WPF is probably more 
important for application developers than Vista is. WPF also runs on Windows XP, so it is not tied to Vista.

Read this and this and this to get a better understanding of WPF. Also watch this video. Even if you never 
plan to use WPF, knowing the technology and the concepts is useful.

WPF applications can be deployed to the desktop or run in Internet Explorer (on Windows only, as far as I know). When WPF application run in Internet Explorer they run in a sandbox, so users simply point Internet Explorer 
at an URL and your application appears without any installation or confirmation need. All development tools 
are the same (Visual Studio) when making desktop and browser-based WPF applications, and you can use the same widgets for both.

WPF running in Internet Explorer have some restrictions compared to a program running on the desktop. For 
example, opening new windows is not possible and communication (WCF) is not allowed. Apparently SOAP calls
 can be used instead.

Making a WPF application run in the browser is easy. You create a project in Visual Studio marking it as 
a “WPF Browser Application”. After compilation, you publish the executable to a web server. I think one idea 
in Visual Studio is to allow a desktop-based WPF application and the same browser-based application to be 
produced from the same codebase. I have not tried this yet, but this looks like a promising concept.

Back to Silverlight… Like WPF-applications can run in a browser, so do Silverlight applications. But 
Silverlight applications can be deployed to more platforms (OS X and Linux) and more browsers. This does however come with a cost… Like browsers-based WPF applications lose access to some functions compared to desktop applications, Silverlight applications can build on even less infrastructure. The GUI is one (of many) missing elements in Silverlight:

“ (…) it's important to note that a lot of the staple approaches you may be familiar with from building 
Windows Presentation Foundation (WPF) applications will not work in Silverlight, which uses only a subset 
of WPF's capabilities. Silverlight does not support most of the WPF component primitives, such as Buttons
 and TextBoxes, and it supports only one layout type: the absolute positioning layout. As a result, porting an existing WPF application to Silverlight will force a total rewrite of all the UI-related code.” (From DevX)
Of course, people are building widget libraries for Silverlight, but wouldn’t it better if WPF was fully 
included? There could be various reasons for not including it… One could be size, but does that really matters these days? Another reason could be that Microsoft simply does not want all other operating systems to be 
able to run (the new wave of) Windows programs for free.

For application developers this sums up to using one of these platforms (not counting web interfaces) when
 writing new software in Visual Studio:

WPF applications running on the desktop (Vista/XP) -- all OS features enabled.
WPF applications running sandboxed in Internet Explorer on Vista & XP -- missing WCF and some permissions,
 e.g. opening new windows.
For the two solutions above, you use same tools and frameworks. Then, for the third one you enter another 
world:

Silverlight running sandboxed on “major browsers” on Windows, Linux and OS X -- heavily reduced WPF (missing
 some 3D functions, widgets gone, etc.) Depend on other 3rd party tools for this functionality.
If you develop a Rich Internet Application, it seems like choosing between WPF and Silverlight will be an important decision that will heavily shape your project.



follow this link
Ravi S replied to Malik on 21-Aug-11 03:44 AM
HI

Silverlight was of course known as WPF/E where E means everywhere. Both use XAML, a form of XML to define controls but WPF is purely for windows while Silverlight runs in the browser on Windows and Macs. Silverlight 3 is out soon, you can download the beta now from the official site and so far I've found nothing bad with it.

Silverlight and Windows Presentation Foundation (WPF) are 2 different products from Microsoft, but has lot of overlap. Silverlight is a sub set of WPF in terms of features and functionality.

Silverlight is a Microsoft technology, competing with Adobes Flash and is meant for developing rich browser based internet applications.

WPF is a Microsoft technology meant for developing enhanced graphics applications for desktop platform. In addition, WPF applications can be hosted on web browsers which offers rich graphics features for web applications. Web Browser Appliactions (WBA) developed on WPF technology uses XAML to host user interface for browser applications. XAML stands for eXtended Application Markup Language which is a new declarative programming model from Microsoft. XAML files are hosted as descrete files in the Web server, but are downloaded to the browsers and converted to user interface by the .NET runtime in the client browsers.

WPF runs on .NET runtime and developers can take advantage of the rich .NET Framework and WPF libraries to build really cool windows applications. WPF supports 3-D graphics, complex animations, hardware acceleration etc.


refer
dipa ahuja replied to Malik on 21-Aug-11 06:10 AM
Keep simple thing in mind SilverLight is used for web pages.. if you want rich ui in you windows app then you can go for WPF application.

WPF has a more advanced and mature XAML support than Silverlight.  Silverlight used to be called (WPF /E) and is a subset of the WPF XAML design.  Therefore, it doesn't support all of the XAML keywords for graphics nor does it support all of the bindings as well and other items.  WPF is hardware accelerated and supports things like GPU shaders which Silverlight 2 does not.

Silverlight 2 does have the VisualStateManager inside Blend 2, which I think WPF needs an add-on and a tweak to work.  I think that is the only case where Silverlight 2 XAML was/is slightly ahead of WPF's.