Making Winforms And WPF Work Together

13
Making Winforms And WPF Work Together Niraj Bhatt Technical Architect | Microsoft MVP http://nirajrules.wordpress.com | [email protected]

description

Making Winforms And WPF Work Together. Niraj Bhatt Technical Architect | Microsoft MVP http://nirajrules.wordpress.com | [email protected]. CrossBow. Codename for WPF / Winforms interop Integrated with VS.NET 2008 Available through WindowsFormsIntegration.dll - PowerPoint PPT Presentation

Transcript of Making Winforms And WPF Work Together

Page 1: Making Winforms And WPF Work Together

Making Winforms And WPF Work Together

Niraj BhattTechnical Architect | Microsoft MVPhttp://nirajrules.wordpress.com | [email protected]

Page 2: Making Winforms And WPF Work Together

CrossBowCodename for WPF / Winforms interopIntegrated with VS.NET 2008Available through WindowsFormsIntegration.dllNo, this is not the official logo

Page 3: Making Winforms And WPF Work Together

CrossBow GoalsProvide Run / Design time solution to enable co-existence of WinForms / WPF in context of a single hybrid applicationPreserve WinForms investmentsAdoption of WPF at customer paceNo Application Rewrite

Page 4: Making Winforms And WPF Work Together

CrossBow Non-GoalsMarkup solution for creating Winforms applicationCode Migration Wizard

Hard to get rightConscious design for WPF

Not just swap control by control

Page 5: Making Winforms And WPF Work Together

Need For InteropWPF doesn’t use HWND RenderingWinforms need a Control derived class

Page 6: Making Winforms And WPF Work Together

Solution via Hosts

WPF Application

WindowsFormsHost

Adapter

Windows FormsControls

WF Application

ElementHost

Adapter

WPF Elements

Page 7: Making Winforms And WPF Work Together

CrossBow Architecture

Crossbow RT

WindowsFormsHost

ElementHost

Unit Conversions

Focus Managem

ent

Keyboard Mgm

t

Property Mapping

Windows Forms

WF Designer

Crossbow Ext

“Cider”

Crossbow Ext

Cider Designer

Page 8: Making Winforms And WPF Work Together

Using ElementHost

VS.NET 2008 with SP1

DEMO

Page 9: Making Winforms And WPF Work Together

Using WindowsFormsHost

VS.NET 2008 with SP1

DEMO

Page 11: Making Winforms And WPF Work Together

Feedback / QnAYour 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!

Page 12: Making Winforms And WPF Work Together

ContactBlog Addresshttp://nirajrules.wordpress.com

Email [email protected]

Page 13: Making Winforms And WPF Work Together

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.