Lecture 12
We will
start discussing WPF (Windows Presentation Foundations) now. It was publicly announced in 2003 (codenamed
Avalon). WPF 4 was released in April 2010. It has a steep learning curve. Code
has to be written in many places. There are multiple ways to do a particular
task.
WPF
enables polished user interfaces which are getting a lot of attention. It
enables rapid iterations and major interface changes throughout the development
process. It allows to keep user interface description and implementation
separate. Developers can create an
“ugly” application which designers can re-theme. Win32 style of programming makes such
re-theming difficult. The code to
re-paint the user interface is mixed up with program logic. GDI was an earlier user interface library
introduced in windows 1.0 in 1985. Opengl was a leap ahead introduced in the
90’s with directx coming in 95 and directx 2 in 96. GDI+ is a newer user
interface library based on directx. It is also used behind Xbox graphics. Next
was Windows Forms which is the primary way of user interface design in C#. XNA
comes with managed library for directx and is great for game development
(.net/com interoperability not required). A simple example is drawing bitmaps
on buttons which can be efficiently done using GDI.
The
highlights of WPF are 1) broad integration (2D, 3D, video, speech libraries
etc.) 2) Resolution Independence with WPF giving emphasis on vector graphics 3)
Hardware accelration as it is based on Direct3D but it can work using software
pipeline also if Direct3D hardware is not available. 4) Declrative progrmaming
using extensible Application Markup Language (XAML; pronounced “Zammel”).
Custom attribute and configuration files were always there but XAML is very
rich. 5) Rich composition and customization e.g. You can create a combobox filled with
animated
Buttons
or a Menu filled with live video clips! And it is quite easy to skin
applications.
In
short, WPF aims to combine the best attributes of systems such as directx (3D
and hardware acceleration), Windows Forms (developer productivity), Adobe Flash
(powerful animation support) and HTML (declarative markup). The first release in November 2006 was WPF
3.0 because it shipped as part of the .NET Framework 3.0. WPF 3.5 came an year
later. Next version as part of .NET 3.5 SP1 came in August 2008. WPF Toolkit
released in Aug 2008 was experimental.
The toolkit has quick releases.
Regarding tool support, WPF extensions for Visual Studio 2005 came a few
months after the first WPF release and a public release of expression blend.
Now, Visual Studio 2012 is a first class WPF devevelopment environment. Its
mostly re-written using WPF and expression blend is 100% WPF and is great for
designing and prototyping WPF apps.
New
things that came in WPF 3.5/3.5SP1 include Interactive3D with 2d elements in 3d
scenes, first class interoperability with directx, Better data binding using
XLINQ and better validation and debugging which reduces code, Better special
effects, High performance custom drawing, Text improvements, enhancements to
Partial-trust apps, improved deployment, and improved performance.
Things
that came with WPF 4.0 include multi-touch support — compatible with surface
API v2, win7 support like jump lists, new common dialogs etc., new controls
like datagrid, calendar etc, easing animation functions (bounce, elastic),
enhanced styling with visual state manager, improved layout on pixel
boundaries, non-blurry text but some limitations so must opt-in, deployment
improvements, and performance improvements.
1 Comments
zip file password please
ReplyDeletePlease do not enter any spam link in the comment box.