本文讨论WPF 和 Silverlight 的异同点, WPF 为微软主推的桌面应用程序(多为C/S结构)技术平台,而Silverlight是微软主推富客户端网页应用程序(多为B/S结构)技术平台。
1. WPF 和Silverlight的类似点:
a. 都是支持Xaml 语言的
b. 都支持 DEPENDENCY PROPERTIES
c. 都支持通用控件 CONTROLS
d. 都支持ANIMATIONS Storyboard
e. 都支持多媒体技术(MediaElement)
f. 都支持INK AND STYLUS, 这里是一段解释
Digital ink refers to a method of input using a stylus on a touch-sensitive surface. Tablet PCs, pressure-sensitive tablets, touch screens, and other electronic devices have the capability to create digital ink. In addition, the mouse may also be used as a stylus device, though it is generally more difficult to use in that manner.
2. WPF 和Silverlight的不同点
a. WPF 为微软主推的桌面应用程序 (多为C/S结构) 技术平台,而Silverlight是微软主推富客户端网页应用程序(多为B/S结构)技术平台, 前者编写的程序一般由操作系统运行,但后者基本上是镶嵌在浏览器中运行的 。
b. WPF Triggers VS Silverlight Visual State Manager
c. Silverlight 使用字体时需要先下载
d. .Net framework, WPF是运行在全集的.Net framework之上,因此WPF在可以没有任何限制的使用.Net framework所有类库和程序集, 但Silverlight 是运行在一个精简版的framework之上,比如(有些集合类在ArrayList就不能在 Silverlight 中使用):
不同还有很多,这里给大家介绍WFP和Silverlight异同的一个文档(Here is a great article about the programmatic Differences Between Silverlight and WPF):
http://wpfslguidance.codeplex.com/
Table of Contents ...............................................................................................................................2
Introduction ....................................................................................................................................5
Similarities Between Silverlight and WPF ............................................................................................5
Dependency Properties .......................................................................................................................... 6
Controls ................................................................................................................................................ 6
Animations ............................................................................................................................................ 7
Custom Controls ................................................................................................................................... 7
User Controls .................................................................................................................................... 8
Video ..................................................................................................................................................... 8
Ink and Stylus ........................................................................................................................................ 9
Differences Between Silverlight and WPF ...........................................................................................9
Architecture .......................................................................................................................................... 9
Deployment ........................................................................................................................................ 10
BAML/XAML .................................................................................................................................... 10
XAML................................................................................................................................................... 11
XAML Language............................................................................................................................... 11
Triggers ........................................................................................................................................... 12
Visual State Manager ........................................................................................................................ 13
Markup Extensions ........................................................................................................................... 14
User Interface ..................................................................................................................................... 15
Keyboard ......................................................................................................................................... 16
Mouse ............................................................................................................................................. 17
IsEnabled ......................................................................................................................................... 19
Local File Access ............................................................................................................................... 20
Sub-Pixel Rendering .......................................................................................................................... 20
Font Support ................................................................................................................................... 21
Graphics .......................................................................................................................................... 22
Kiosks .............................................................................................................................................. 24
Object Trees .................................................................................................................................... 25
Control Library .................................................................................................................................... 27
General ............................................................................................................................................... 30
Routed Events ................................................................................................................................. 30
Data-Binding ................................................................................................................................... 30
Networking ..................................................................................................................................... 35
Local Isolated Storage ....................................................................................................................... 37
Resource Dictionaries ....................................................................................................................... 39
Custom Dependency Properties ....................................................................................................... 40
Commanding ................................................................................................................................... 41
.Net Framework .................................................................................................................................. 41
Collections ...................................................................................................................................... 41
Cryptography .................................................................................................................................. 42
Threading ........................................................................................................................................ 43
WPF Specific Functionality ............................................................................................................... 44
Desktop Functionality ........................................................................................................................... 44
Printing ........................................................................................................................................... 44
XPS Documents ............................................................................................................................... 44
Speech ............................................................................................................................................ 46
InterOp ............................................................................................................................................ 47
XAML................................................................................................................................................... 48
Styles ............................................................................................................................................... 48
User Interface ..................................................................................................................................... 49
3D Graphics ..................................................................................................................................... 49
Themes ........................................................................................................................................... 49
Skins ................................................................................................................................................ 50
Image Manipulation .......................................................................................................................... 50
Page-Based Navigation ..................................................................................................................... 51
Input Gestures ................................................................................................................................ 52
General Functionality ............................................................................................................................ 53
Freezable Objects............................................................................................................................ 53
Data Providers................................................................................................................................. 53
Validation ........................................................................................................................................ 54
Dynamic Resources ........................................................................................................................... 57
Code Access Security....................................................................................................................... 57
Silverlight Specific Functionality ....................................................................................................... 58
Web Functionality ............................................................................................................................... 58
Browser InterOp ............................................................................................................................... 58
Media .................................................................................................................................................. 60
Traditional Streaming...................................................................................................................... 60
Progressive Download ...................................................................................................................... 60
Smooth Streaming ............................................................................................................................ 60
Timeline Markers .............................................................................................................................. 61
Deep Zoom ......................................................................................................................................... 62
Code Reuse Strategies ...................................................................................................................... 63
User Controls ...................................................................................................................................... 63
Compiler Directives ............................................................................................................................... 63
Linked Files ......................................................................................................................................... 64
Coding Scenarios ................................................................................................................................. 65
Element-to-Element Binding ............................................................................................................. 65
Multi-Data Binding ............................................................................................................................ 67
Triggers / Visual State Manager ........................................................................................................ 68
Fonts ............................................................................................................................................... 69
Summary ....................................................................................................................................... 70
You can download it from http://wpfslguidance.codeplex.com/