Live from TechDays 2006 – Episode Four

Written by Yves

April 5, 2006

Session D304 – WinFX : Presentation Foundation



Probably the most terrifying session of the day…


Remember the days you wrote your personnal web site in Notepad or, if you were lucky enough, in Ultra-Edit. Was it……15, 20 years ago ? Ok, so let’s go back in 1990’s and replace HTML by XAML. No kidding, this presentation was awful. Not because of the quality of the speaker nor the content itself but only because, so far, the only way to write user interface in XAML for Windows Vista is by hand !


Of course, the only limit in designing a UI with XAML is your imagination. It was demonstrated that it will be possible to completely separate the code from your UI description. This offers you a way to customize the look-and-feel of a windows application as you want or depending of the current user, for example.


One reason why Microsoft started with the WPF is to avoid an application UI to freeze. This is mainly caused because the UI thread is consuming so much CPU avoiding a refresh of the UI. 


WPF is using a DirectX surface to draw the user interface. Moreover, when Vista draws a user interface, the WPF extracts what Microsoft call CompNode from the XAML definition in one thread and it will use an other thread to draw in the DirectX surface by using the CompositionEngine. A CompNode is generated for every controls or widgets that compose the UI, building a tree of CompNode. Then, the CompositionEngine will take this tree and generates the right graphic instructions to render properly the user interface. This avoids then any UI freeze.


Now, the question that may raise is : what will happen with GDI+ and DirectX applications ? For old applications, using GDI+ application, Vista will open a DirectX surface and will take GDI+ instructions and draw them in the surface. For DirectX applications, there will be no problem at all and they will be supported.


The Nicolas Clerc’s blog


Tekigo’s web site

You May Also Like…

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *