110 likes | 397 Views
WPF. Windows Presentation Foundation. Origins – Who, When, Where. Who? Microsoft When? November 2006 Where? Windows Vista Windows Server 2003 Windows XP Service Pack 2. What. Application development framework .NET 3.0 graphical subsystem Codenamed Avalon
E N D
WPF WindowsPresentationFoundation
Origins – Who, When, Where • Who? • Microsoft • When? • November 2006 • Where? • Windows Vista • Windows Server 2003 • Windows XP Service Pack 2
What • Application development framework • .NET 3.0 graphical subsystem • Codenamed Avalon • Web-transportable subset (Silverlight)
Why • Features • Media – video, animation, images, documents • Effects – shadows, blurs, transparencies, etc. • Data binding • Design (XAML) • Unified, language-agnostic modeling • View / logic separation – “code-behind” • Performance • 2D / 3D hardware acceleration
How – Layers Presentation Framework End-user presentation – layouts, animations, data binding Presentation Core Properties, dependencies, dispatchers Common Language Runtime .NET virtual machine Media Integration 3D, animations Codecs Media codecs User32 Legacy system DirectX Hardware Accel.
How – Internal Structure • Document Object Model (DOM) • Eg. JavaScript’s HTML DOM • Tree of Visual Objects • Rendering details (transparencies, clipping, etc.) • Dependency Objects • Event-driven behaviour triggers • Declarative Programming (XAML) • eXtensible Application Markup Language
How – Thread Responsibilities • Media Integration Layer (MIL) • Background thread • Periodically traverses DOM • Painter’s Algorithm • Caches, buffers and renders elements • UI Manager • Priority-sorted Dispatcher queue • GUI functionality only • Like SwingWorkers and Event Dispatch Thread
XAML • eXtensible Application Markup Language • Like the eXtensible UI Language (XUL) • XML-based • eXtensible HyperText Markup Language (XHTML) • OpenDocument Format (ODF) • Office Open XML (OOXML - .docx, .xlsx, .pptx) • eXtensible Presentation Format (XPF) • Scalable Vector Graphics (SVG)
XML Advantages • Dominant document model language • Readable and generic • XQuery (XML Query Language) • Set of all colours used • //@color • Average count of buttons per window • count(//button) • XSL (Extensible Stylesheet Language) • XSL-FO (XSL Formatting Objects) • XSLT (XSL Transform)
Development • Microsoft Expression Blend • The artist [tool] formerly known as Sparkle • Artist-friendly development • No Photoshop / UI translation • Searchable components • Scalable modules • Scrollable panel container
Assignment • Install Microsoft Expression Blend trial • \\142.232.18.47\4870\blend.msi • Create GUI in design mode • GridSplitter • Rectangle, featuring • Rounded corners • Angled gradients • Transparency • Borders • View and comment XAML