.Net 3.0 and Windows Presentation Foundation - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

.Net 3.0 and Windows Presentation Foundation

Description:

Canvas: Free positioned layout. Controls: All the usual plus new addtions ... Audio & Video. Formats: WMV, MPEG, Some AVIs. Can be synchronized with animations ... – PowerPoint PPT presentation

Number of Views:286
Avg rating:3.0/5.0
Slides: 28
Provided by: jimfa
Category:

less

Transcript and Presenter's Notes

Title: .Net 3.0 and Windows Presentation Foundation


1
.Net 3.0 and Windows Presentation Foundation
  • Jim Fawcett
  • CSE775 Distributed Objects
  • Spring 2007

2
References
  • Introducing Windows Presentation Foundation,
    David Chappell, http//msdn2.microsoft.com/en-us/l
    ibrary/aa663364.aspx
  • Several figures used from this presentation
  • Introducing Windows Communication Foundation,
    David Chappell, http//www.davidchappell.com/Intro
    ducingWCFv1.2.1.pdf
  • Several figures used from this presentation
  • Foundations of Windows Presentation Foundation,
    Laurence Moroney, Apress, 2006
  • Scalable Vector Graphics (SVG), XML Graphics for
    the Web, http//www.w3.org/Graphics/SVG/

3
References
  • Introduction to Vector Markup Language (VML),
    http//msdn.microsoft.com/library/default.asp?url
    /workshop/author/vml/default.asp
  • Windows Presentation Foundation, Ronnie
    Saurenmann, www.00001001.ch/Download/WebSummit/WPF
    .ppt
  • Windows Presentation Foundation, Sue Chard,
    www.devlab.ac.nz/dotnetlink/wpf.ppt

4
.Net 3.0
  • The .Net 3.0 Framework has support for three
    major pieces, available for Vista, XP, and Server
    2003
  • Windows Work Flow (WF)
  • Windows Communication Foundation (WCF)
  • Windows Presentation Foundation (WPF)
  • There is a fourth piece, Media Foundation,
    available only on Vista
  • A COM multi-media framework, designed to replace
    DirectShow, Windows Media SDK, DirectX media,
    etc.
  • Wont be available on XP.
  • Basic tools (command line compilers etc) and
    Framework classes support these.
  • New, more productive, tools are coming with the
    Orcas release of Visual Studio, later this year.

5
Windows Work Flow (WF)
  • Windows Work Flow is
  • An execution engine for code-based activities
  • Essentially an attempt at simplifying
    organization of programs.
  • Executes activity blocks and sequences between
    blocks based on connectivity and control
    constructs, or based on events.
  • Runs in two modes
  • Sequential is essentially a flow-chart execution
    engine
  • State is a state-machine execution engine
  • Discussion Ive read indicates that it is
    oriented primarily toward implementing Business
    Rules.
  • Workflows are programmed in XAML (used to be
    called XOML in WF. The O stood for Object.

6
All diagrams from Chappell, IWPF
7
Windows Communication Foundation
  • Convergence of application programming models for
    communication, supporting
  • Web Services (Asp Web Services)
  • Web Applications (Asp.Net)
  • Windows Services (NT Services)
  • Remoting (.Net Remoting)
  • Queuing (MSMQ)
  • Can be hosted in
  • IIS
  • Windows Services
  • Windows Applications

8
WCF Services
Chappell (IWCF)
9
Windows Presentation Foundation
  • Convergence of presentation programming models,
    Supporting
  • Desktop applications
  • WinForms, MFC, WTL, Win32
  • Web applications
  • Asp.Net
  • Document presentation
  • Word Documents

10
Chappell (IWPF)
11
Chappell (IWPF)
12
Elements of WPF
  • Scalable Vector Graphics
  • It is not clear whether WPF is based on standard
    SVG or on Microsofts proprietary Vector Markup
    Language (VML)
  • eXtensible Application Markup Lanaguage (XAML)
  • A dilect of XML with tags defined for specific
    graphics (or other application) operations
    ltRectangle Width"30" Height"10"
    Fill"HorizontalGradient Red Yellow" /gt
  • CodeBehind
  • Event handler code

13
Applications
Controls
Styling
Layout
Data
Content
Action
Presentation Framework
Adapted from Chard (WPF)
PresentationCore.dll - managed
MilCore.dll unmanaged composition
DirectX a COM technology
Driver
14
Features
  • Programming
  • Declarative programming with XAML
  • Imperative programming with classes from
    System.Windows namespace
  • Interop with Forms
  • Host Forms controls on WPF pages
  • Host WPF controls on Forms

15
WPF Support for Presentation
  • Presentation mode
  • Window basic display windows
  • NavigationWindow hyperlinked navigation
  • Layout
  • DockPanel Flow layout like a web page
  • StackPanel Linear layout, ala toolbars
  • Grid Absolute positioning on grid
  • Canvas Free positioned layout
  • Controls
  • All the usual plus new addtions
  • Supports custom controls

16
Styles
  • Cascading Style Sheets
  • It is not clear that WPF directly supports CSS
  • WPF does have DataTemplate and ControlTemplate
    classes that support styling data layouts and
    controls.
  • Style element class
  • ltstylegtlt/stylegt
  • Inline styles
  • ltButton styleStaticResource ButtonStylegta
    titlelt/Buttongt

17
Documents
  • Typography
  • OpenType fonts
  • ClearType
  • Glyphs
  • Documents
  • FixedDocument class
  • Layout is fixed for rendering in any window or
    printer, does not flow
  • FlowDocument class
  • Uses browser flow model
  • Lots of control over the details of how that is
    done through properties

18
Media
  • Images
  • ltImage width200 SourceC\temp\us.jpg /gt
  • Can have metadata
  • Can be painted onto 3D canvases
  • Video
  • ltMediaElement Sourcec\temp\myVid.wmv /gt
  • Handles wmv, mpeg, avi, wav,

19
Audio Video
Ronnie Saurenmann (WPF)
  • Formats WMV, MPEG, Some AVIs
  • Can be synchronized with animations
  • Windows Media Foundation used to instantiate
    playback machinery into a DirectShow graph

20
2D Graphics
  • Support for primitives
  • Line, Ellipse, Rectangle, Polygon, Polyline, Path
  • Support for defining regions
  • LineGeometry, RectangleGeometry,

21
2D Graphics, 3D Graphics, Imaging
2D Graphics
Imaging
Ronnie Saurenmann (WPF)
3D Graphics
22
3D Graphics
  • Viewport3D control
  • Models
  • Define shape, lighting, viewing
  • GeometryModel3D class
  • SpecularMaterial class
  • DiffuseMaterial class
  • DirectionalLight
  • AmbientLight
  • PerspectiveCamera
  • OrthographicCamera

23
Transformations
  • RotateTransform
  • ScaleTransform
  • RenderTransform
  • Blur and glow effects

24
Animations
  • Storyboard class
  • Defines element(s) to which animation applies, by
    name
  • Initial properties like size and position
  • Range of changes of those properties with
    duration settings (time between changes)

25
Combining Stuff
  • Most of the WPF elements can be containers
  • Can put an ellipse in a button
  • Graphics figures, controls, animations, can be
    freely mixed and applied to each other.

26
Applications
  • Desktop applications
  • Full trust
  • Rich, but familiar applications
  • XAML Browser Applications (XBAPS)
  • Lowered trust
  • Many operations are not allowed, e.g., access to
    local file system
  • May appear very like an equivalent desktop
    application
  • Most of the code is the same

27
End of Presenation
Write a Comment
User Comments (0)
About PowerShow.com