Windows Presentation Foundation Fabio Santini Windows Presentation Foundation Fabio Santini
Agenda Per iniziare Introduzione a Windows Presentation Foundation Come funziona ? Cosè XAML ? Interactive Designer (Sparkle) Come migrare ? Esempi
Per iniziare … hebeta/default.aspx hebeta/default.aspx Microsoft Pre-Release Software WinFX Runtime Components - January Community Technology Preview (CTP) (2.4 Mb) Visual Studio 2005 (anche se si può fare tutto a manina) Microsoft® Windows® Software Development Kit (SDK) for the January 2006 WinFX® Runtime Components Community Technology Preview (CTP) ( MB) Microsoft Visual Studio Code Name Orcas Community Technology Preview - Development Tools for WinFX® (3.6 Mb)
Per iniziare … Se non funziona il setup Provate a disinstallare Microsoft Command Shell (Monad) e il Compact Framework 2.0 Eseguire il setup chiedendo un log più completo Setup.exe -l*v Se non funziona lelemento MediaElement E probabile che il setup non sia riuscito a sostiture due dll dxva2.dll (DirectX Video Acceleration 2.0) e evr.dll (Enhanced Video Renderer)
La nostra prima applicazione
Element System Font System Input System Event System Property System Visual System Composition System Transport Styles, bindings, controls Styles, bindings, controls Layout Layout Text layout (PTS) Text layout (PTS) Glyphs Glyphs Metrics Metrics Cache Cache Mouse, Keyboard, Pen Mouse, Keyboard, Pen Commands Commands Video, Audio Video, Audio 2D, 3D, Animation 2D, 3D, Animation Text layout (line) Text layout (line) Routing Routing Class handlers Class handlers Change notification Change notification Storage Storage Expressions Expressions Remoting Remoting Message based Message based 2D, 3D 2D, 3D Hardware, Software Hardware, Software
Step 1: Scriviamo il programma
<ListBox> </ListBox>
Step 2: Compiliamo
BAML C#/VB/etc EXE Images, etc
Step 3: Eseguiamo il programma
Step 4: Mostriamo i pixel
ListBox ButtonButton ScrollViewer StackPanel Render Measure & Arrange
CompNode CompNode CompNode CompNode
CompNode CompNodeCompNodeCompNode ListBox Button Button ScrollViewer StackPanel Transport UI Thread Render Thread
DX Surfaces Bitmaps CompNode CompNodeCompNodeCompNode
Step 5: Comunichiamo con lutente
ListBox Button Button ScrollViewer StackPanel Mouse Click! CompNode CompNodeCompNodeCompNode 1.User32 gets the message 2.WPF converts message to an input report 3.If input report is a mouse move… Structural hit testing on visualsStructural hit testing on visuals Geometry hit testing through geometry dataGeometry hit testing through geometry data 4.Convert reports into one or more events 5.For each event… Build event routeBuild event route Raise eventsRaise events
Step 6: Utilizziamo gli elementi
Step 7: Ritorniamo al punto 4 (ricordate: Mostriamo i pixel)
Usiamo XAML
Come migrare ? Integrazione tra i due mondi Un nuovo modo di pensare alle interfacce
© 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.