Paul Harrington talked about the new WPF UI of Visual Studio 2010, the start page and many other designers, displaying the Visual Studio 2010 WPF visual tree using Snoop.
Architectural reason is one of the reasons Visual Studio 2010 has been reprogrammed to use WPF 4.0. Separated presentation and support for long range road map.
He also explained that VS 2010 features really need it: Editors, Architect designer editor, Parallel tools, Workflow designer and more
Another reason is to make it easy to develop new features in VS 2010.
Here are several features added to VS2010 for WPF:
-
Declarative UI using XAML
-
Data binding managed and native data models
-
Styling Templates
-
Application resources
-
Interop with Win32
-
Integration with the message loop
-
New text stack based on DirectWrite
After explaining why using WPF in VS2010 he talked about the how.
-
Defining the data models
-
Replacing the VS main window with WPF (creating window without displaying it)
-
Write new components: Command Bar, hidden behind switches off by default
-
Scouting with selected teams
-
Lot of testing
-
Leaving old presentation for regression testing
-
Removing old code
He mentioned that testing conversion costs, and the main reason was that there are no HWNDs in WPF!
Testing of the new VS 2010 yields unify test frameworks based on UI Automation, and best practices. One of the important one was test at data layer, means Separated Presentation is important!
The challenges the VS 2010 team were:
-
Mixed mode application – native and managed code, WPF and HWNDs
-
Allow new extensions to take advantage of WPF (creating plug-ins for VS using pure WPF)
-
Text clarity since WPF blends colors in small text becomes blurry
-
Performance – Beta 2 is lot more better than Beta 1, and there is lot more work to do. This is the key issue for next
Challenges of Mixed-Mode
-
Managed code binding to native models
-
Interop in the presentation layer (especially in focus mechanism)
-
Text and image clarity stack: TextOptions.TextFormattingMode removes the blur from text
Performance Issues
-
Switching tab – it is highly recommended to keep the load operation atomic as possible. Make sure that the visual tree you switch to would be fully ready before switch
-
Memory usage using tools such as VMMap (look at image load), SOS.dll, !dumpheap-stat
-
Windows performance analyzer (xperf)
-
Hardware vs software rendering (Virtual Machines and Remote Desktop) – Gradient fill is more expensive in remote desktop, using solid brushes instead
-
Scrolling in the editor
Who were involved:
Core team of about 12 people, 7 developers and 5 testers, the WPF Team and the Expression Suite Team