Making Winforms And WPF Work Together Niraj Bhatt Technical Architect | Microsoft MVP http://nirajrules.wordpress.com | niraj@indiamvps.net
CrossBow Codename for WPF / Winforms interop Integrated with VS.NET 2008 Available through WindowsFormsIntegration.dll No, this is not the official logo
CrossBow Goals Provide Run / Design time solution to enable co-existence of WinForms / WPF in context of a single hybrid application Preserve WinForms investments Adoption of WPF at customer pace No Application Rewrite
CrossBow Non-Goals Markup solution for creating Winforms application Code Migration Wizard Hard to get right Conscious design for WPF Not just swap control by control
Need For Interop WPF doesn’t use HWND Rendering Winforms need a Control derived class
Solution via Hosts WPF Application WF Application Windows Forms Controls WPF Elements WindowsFormsHost ElementHost Adapter Adapter
CrossBow Architecture Crossbow RT Unit Conversions Focus Management Keyboard Mgmt Property Mapping Windows Forms “Cider” WindowsFormsHost Crossbow Ext Crossbow Ext ElementHost WF Designer Cider Designer
DEMO Using ElementHost VS.NET 2008 with SP1
Using WindowsFormsHost DEMO Using WindowsFormsHost VS.NET 2008 with SP1
References MSDN Blogs Books Migration & Interoperability Mike Henderlight Daniel Moth Josh Smith Books Programming WPF – Chris Sells & Ian Griffiths
Feedback / QnA Your Feedback is Important! Please take a few moments to fill out our online feedback form Use the Question Manager on LiveMeeting to ask your questions now!
Contact Blog Address http://nirajrules.wordpress.com Email Address niraj@indiamvps.net