Introduction to WPF - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Introduction to WPF

Description:

... Firefox and Internet Explorer 7 on Windows and ... XBAPs require Internet Explorer 7. Standard on Vista but requires a custom install on Windows XP ... – PowerPoint PPT presentation

Number of Views:1754
Avg rating:3.0/5.0
Slides: 31
Provided by: iedot
Category:

less

Transcript and Presenter's Notes

Title: Introduction to WPF


1
Introduction to WPF
  • Calvin P. Schrotenboer

2
What is WPF?
  • Windows Presentation Foundation is one of four
    principal components in .NET 3.0
  • The others are Windows Communication Foundation
    (WCF), Windows Workflow Foundation (WF) and
    Windows Cardspace (WCS) (InfoCard)
  • WPF is essentially an alternative method for
    developing Windows based applications

3
WPF Demos
  • New York Times Reader
  • Nostalgia Photo Viewer

4
WPF vs Windows Forms Development
  • WPF has a number of advantages over Windows Forms
    development which include
  • Comprehensive Integration WPF provides a
    uniform platform for using video, speech, text,
    2D and 3D graphics
  • Resolution Independence as DPI increases, WPF
    applications maintain their size exactly
  • Instead of shrinking, WPF applications merely get
    sharper

5
WPF Advantages over Windows Forms Development
  • WPF supports hardware acceleration
  • WPF applications can take advantage of GPUs on
    Graphics cards for smoother graphics
  • WPF allows the effective separation of design
    work (to be performed by Designers) and
    functionality (to be performed by Developers)

6
WPF Advantages over Windows Forms Development
  • WPF supports a new model for content under which
    almost any control can host almost any other
    control
  • This permits very rich user interfaces as almost
    any control can support 3D graphics, animations
    and even videos
  • WPF supports almost complete scalability

7
WPF Advantages over Windows Forms Development
  • WPF was designed from the ground up for managed
    code
  • WPF benefits from 5 years of experience with .NET

8
Disadvantages of WPF
  • At the present time there are certain controls
    available in Windows Forms for which no WPF
    equivalent exists
  • Eg DataGridView and PropertyGrid
  • The learning curve for WPF is very, very steep

9
The Future of Windows Forms Development
  • Adam Nathan, one of the authors of a leading WPF
    book, has suggested that there will be no further
    development by Microsoft for Windows Forms beyond
    Version 2.0 (released in 2005)

10
WPF and Windows Vista
  • WPF does not explicitly require Windows Vista
  • WPF also will work with Windows XP Service Pack 2
    and with Windows Server 2003 SP1
  • Of course, WPF does require Version 3.0 of the
    .NET Framework, a free download from Microsoft
  • .NET Framework 3.0 is automatically included with
    Windows Vista

11
WPF and Windows Vista
  • There are some relatively minor features of WPF
    which are only supported on Windows Vista
  • 3D objects only get anti-aliasing on Windows
    Vista or later
  • Non-rectangular or translucent windows only get
    hardware acceleration on Windows Vista or later

12
WPF and XAML
  • XAML is a declarative programming language
    designed for constructing and initializing .NET
    objects
  • XAML code is principally the textual
    representation of some visual element either a
    graphic object or a user interface object such as
    a button or a combo box

13
WPF and XAML
  • Under the standard paradigm the User Interface is
    described in XAML and the underlying
    functionality is built using C (or Visual
    Basic.NET)
  • However, using Markup Extensions Microsoft has
    cleverly been able to build a considerable degree
    functionality into XAML
  • Usually when things can be expressed in either C
    or XAML, XAML is more terse

14
Demo
  • Huntress Demo (Graphic image)
  • AllXAMLClock (Animation)
  • XAML User Interface Example
  • CS User Interface Example

15
What is WPF/E
  • WPF/E stands for WPF Everywhere
  • WPF/E is basically a Microsoft equivalent for
    Macromedia Flash
  • Currently only in beta form, WPF supports Firefox
    and Internet Explorer 7 on Windows and Firefox
    and Safari on the MAC

16
WPF/E Demo
  • PageTurn
  • Microbe The city where WPF/E and Flash live
    together in harmony
  • WPF/E and Flash Interactive Example

17
What is the Relationship Between WPF/E and WPF
  • WPF/E uses a Javascript control to host content
    created using XAML
  • Recall that vector graphics can be expressed in
    XAML and that WPF has very strong support for
    animations
  • Client side event handling is processed using
    Javascript

18
Does WPF Apply Only to Windows Based Applications
  • Answer Not entirely
  • As we have seen the WPF/E branch of WPF is
    designed for Internet delivery and to be platform
    independent
  • Also, XAML Browser applications (XBAPs) are a
    variation of a WPF application which can run over
    the Internet
  • However, there are considerable restrictions on
    XBAPs

19
XBAP Limitations
  • XBAPs will only run on Windows
  • XBAPs require Version 3.0 of the .NET Framework
    (2.8 MB 7 minutes on a 56Kb Dialup, 1 minute or
    less on a decent DSL time to install)
  • XBAPs require Internet Explorer 7
  • Standard on Vista but requires a custom install
    on Windows XP

20
XBAP Limitations
  • Because XBAP applications run in a Browser (in
    the partially trusted Internet Zone), they are
    denied certain functionality
  • File I/O is denied
  • Access to the Registry is denied

21
XBAP Demo
  • PhotoViewer Demo
  • (Coming Later)

22
Loose XAML Pages
  • It is not possible to simply write web pages in
    XAML and expect clients to view them with their
    browsers
  • Loose XAML can only be viewed in a browser under
    very limited circumstances
  • Moreover, since a large portion of functionality
    is implemented via C, this is unavailable with
    loose XAML

23
WPF and ASP.NET
  • Given the limitations of XBAPs and Loose XAML
    pages, there is no doubt that WPF will not have
    any negative impact on ASP.NET development

24
What is the Expressions Suite
  • The Expressions Suite consists of four designer
    type applications
  • Only one of these applications, Expressions Web
    Designer has been officially released (January,
    2007)
  • The other three releases are currently in beta
    release (or CTP)

25
Expressions Web Designer
  • This product is essentially the successor to
    Microsoft Front Page
  • Its principal competitor is Macromedia (Adobe)
    DreamWeaver
  • The emphasis by Microsoft for this product is
    Standards Based web design (XHTML)
  • This product has nothing at all directly to do
    with WPF

26
Expressions Blend
  • Expressions Blend is a Visual Studio like tool
    for designing WPF user interfaces
  • While Blend is intended for use by Designers, it
    is sufficiently superior to the equivalent
    designer in Visual Studio that most Developers
    will likely use it in conjunction with Visual
    Studio

27
Expressions Graphic Designer
  • This product represents Microsofts attempt to
    move into the space occupied by Adobe Illustrator
    and CorelDraw
  • Vector Graphics
  • Graphic Designer uses XAML as its native output
    language
  • This, of course, facilitates using these vector
    graphics in WPF applications

28
Expressions Media
  • The latest addition to the Expressions suite
  • Represents a content management system similar to
    Adobe Bridge
  • No direct relationship with WPF

29
Additional Demos
  • XcEEd DataGrid

30
Further Study
  • Windows Presentation Foundation Introduction
    CIS-019M
  • Foothill College Los Altos Hills, CA
  • Spring Term (April June) 2007
  • Available both Online and Face to Face
  • Also a class on Expressions Blend (Summer 07)
Write a Comment
User Comments (0)
About PowerShow.com