|
|
|
|
|
Home
»
WPF
»
WPF: An Introduction (Part 2)
|
|
|
|
Author Rank :
|
|
|
Page Views :
|
3868
|
|
Downloads :
|
0
|
|
Rating :
|
Rate it
|
|
Level :
|
Beginner
|
|
|
Back to Part 1
ADVANTAGES & DISADVANTAGES OF WPF:
Advantages:
- Tight multimedia integration -
to use 3-D graphics, video, speech, and rich document viewing in Windows
32 or Windows Forms applications, you would need to learn several
independent technologies and blend them together without much built-in
support. WPF applications allow you to use all these features with a
consistent programming model.
- Resolution independence -
WPF lets you shrink or enlarge elements on the screen, independent of
the screen's resolution. It uses vector graphics to make your
applications resolution-independent.
- Hardware acceleration -
WPF is built on top of Direct3D, which offloads work to graphics
processing units (GPUs) instead of central processor units (CPUs). This
provides WPF applications with the benefit of hardware acceleration,
permitting smoother graphics and enhanced performance.
- Declarative programming -
WPF uses Extensible Application Markup Language (XAML) declarative
programming to define the layout of application objects and to represent
3-D models, among other things. This allows graphic designers to
directly contribute to the look and feel of WPF applications.
- Rich composition and customization -
WPF controls are easily customizable. You need not write any code to
customize controls in very unique ways. WPF also lets you create skins
for applications that have radically different looks.
- Easy deployment - WPF
provides options for deploying traditional Windows applications (using
Windows Installer or Click Once). This feature is not unique to WPF, but
is still an important component of the technology.
- Culturally aware controls -
static text in controls and the return data for the String function are
modified according to the culture and language specified by the end
user's operating system.
Disadvantages:
- WPF's in-box control suite is far more limited than that of WinForms.
- There's greater support in the
3rd-party control space for WinForms. (That's changing, but for now by
advantage of time, WinForms has greater support in the community).
- Most developers already know WinForms; WPF provides a new learning curve
- WPF will not run on windows 2000 or lower.
- No MDI child mode.
WPF TOOLS:
- Microsoft Visual Studio: is a
developer-oriented IDE that contains a combination of XAML editor and
WPF visual designer, beginning with Visual Studio 2008. The WPF designer
add-in, codenamed Cider, is a WYSIWYG editor for creating WPF windows,
pages and user controls. It was available earlier as Visual Studio 2005
extensions for .NET Framework 3.0 CTP for the initial release of WPF but
is no longer available.
- Microsoft Visual Studio Express
2008 and later editions, particularly Visual C# Express and Visual Basic
Express, also have the WPF designer integrated.
- Microsoft Expression Blend:
is a designer-oriented tool that provides an art board for the creation
of WPF applications with 2D and 3D graphics, text and forms content. It
generates XAML that may be exported into other tools and shares
solution (sln files) and project formats (csproj, vbproj) with Microsoft
Visual Studio.
- Microsoft Expression Design: is a bitmap and 2D-vector graphics tool that allows export to XAML.
- XAMLPad: is a lightweight
tool included in the .NET Framework SDK. It can create and render XAML
files using a split screen UI layout. It also provides a tree view of
the markup in a panel.
WPF ASSEMBLIES AND NAMESPACES:
Primary assemblies:
- PresentationCore
- PresentationFramework
- WindowsBase
Namespaces
- System.Windows
All child namespaces except System.Windows.Forms
CLASS HIERARCHY OF WPF:

WPF ARCHITECTURE:

In this architecture these three Assemblies can be categorized as:
- Managed Layer
- Unmanaged Layer
- Core API
MANAGED LAYER:
Windows
Presentation Foundation (WPF) managed layer is a set of classes and
types that are built using the .NET Framework which means that it is
managed by Common Language Runtime (CLR). In this layer there are three
assemblies that comprise the WPF framework:
- PresentationFramework.dll: Creates the High level elements like layout panels, controls, windows, styles etc.
- PresentationCore.dll: It holds base types such as UIElement, Visual from which all shapes and controls are derived in PresentationFramework.dll.
- WindowsBase.dll: They hold
even more basic elements which are capable to be used outside the WPF
environment like Dispatcher object, Dependency Objects. I will discuss
each of them later.
UNMANAGED LAYER
- Milcore.dll: The unmanaged
layer of WPF is called milcore or Media Integration Library Core. It
basically translates the WPF higher level objects like layout panels,
buttons, animation etc... Into textures that Direct3D expects. It is the
main rendering engine of WPF.
- WindowsCodecs.dll: This is
another low level API which is used for imaging support in WPF
applications. WindowsCodecs.dll comprises of a number of codecs which
encodes / decodes images into vector graphics that would be rendered
into WPF screen.
- Direct3D: It is the low level API in which the graphics of WPF is rendered.
- User32: It is the primary core API which every program uses. It actually manages memory and process separation.
- GDI & Device Drivers: GDI and Device Drivers are specific to the operating system which is also used from the application to access low level APIs.
DIFFERENCE BETWEEN WPF AND SILVERLIGHT
Silverlight
and Windows Presentation Foundation (WPF) are 2 different products from
Microsoft, but have lot of overlap. Silverlight is a subset of WPF in
terms of features and functionality. 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. So, here are the differences between WPF
and Silverlight:
- Silverlight is meant to be used online, while WPF is for local use.
- Silverlight lacks access to local resources, while WPF can utilize local resources.
- Silverlight only has perspective 3D support, while WPF is capable of full 3D images.
- Silverlight does not support some of the more advanced concepts of WPF such as controls and templating.
- Silverlight integrates right into
an HTML page whereas WPF XAML files have to be loaded via a frame if
they want to mix with HTML content.
|
|
Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post
Here.
|
|
|
|
|
Login
to add your contents and source code to this article
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional
consulting company, our consultants are well-known experts in .NET and many of them
are MVPs, authors, and trainers. We specialize in Microsoft .NET development and
utilize Agile Development and Extreme Programming practices to provide fast pace
quick turnaround results. Our software development model is a mix of Agile Development,
traditional SDLC, and Waterfall models.
|
|
Click here to learn more about C# Consulting. |
|
|
|
|
|
|
|
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon.
Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees.
As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
|
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
|
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
|
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
|
|
|
|
|
|
|
|
|
|
|
|
|