#18 – Silverlight and WPF Differences

Silverlight’s original name was WPF/E (WPF/Everywhere), underscoring the fact that Silverlight follows the same programming model as WPF and uses many of the same controls, but is based on a client library that is downloaded from the browser and targeted to run on a wider variety of platforms.

Core differences between WPF and Silverlight:

  • WPF runs only on Windows platforms
  • WPF expects .NET Framework to already be present on client
  • Silverlight can use a subset of all WPF controls
  • Silverlight uses a subset of the full .NET Framework and the CLR

Features present in WPF but not in Silverlight:

  • Flow document support
  • Dynamic resources
  • Merged dictionaries
  • Resetting a style to a new FrameworkElement
  • Style inheritance
  • Implicit styles with TargetType attribute
  • Triggers for Styles, ControlTemplates, DataTemplates.
  • Larger number of data binding features
  • Routed commands
  • Declaratively associate controls and commands
  • Inherit from UIElement
  • Custom markup extensions
  • Runtime-accessible visual and logical trees
  • Controls: AccessText, BulletChrome, ButtonChrome, ContextMenu, Decorator, DocumentPageView, DocumentViewer, GridViewColumnHeader, GridViewRowPresenter, GroupBox, GroupItem, InkCanvas, Menu, MenuItem, PageContent, Ribbon, Separator, StatusBar, TickBar, ToolBar, Track, UniformGrid,

Features present in Silverlight but not in WPF:

  • Deep Zoom
  • Controls: AutoCompleteBox, DataPager, DescriptionViewer, HyperlinkButton, MultiScaleImage, NumericUpDown, ValidationSummary
Advertisements

#15 – WPF vs. Silverlight and ASP.NET

WPF, Silverlight and ASP.NET are Microsoft’s three main application development platforms.

  • WPF
    • For developing Windows applications
    • Thick client user interface, with most rich set of user controls and Windows-specific features
    • Platforms–runs only on Windows, in or out of browser
    • Requires full .NET Framework installed on client
  • Silverlight
    • For developing web applications that can also run out of browser
    • Thin client, with richer UI controls that are closer to traditional thick client controls
    • Platforms
      • Runs as browser plug-in in most browsers
      • Silverlight client software runs on Windows, Mac OS X, Windows Phone 7
      • Moonlight version of Silverlight allows running on Linux
    • Requires Silverlight framework installed on client (when page is first loaded)
  • ASP.NET
    • For developing web applications
    • Thin client, with fairly generic web-based controls
    • Platforms–runs on server, so client is delivered as standard HTML on any platform–including browsers on mobile devices
    • Requires nothing to be installed on client