Welcome to WindowsClient.net | Sign in | Join

Host a WPF Control in a Win32 Application

The decision to move to a new technology is often met with some resistance.Wouldn’t it be nice to be able to work with the latest technology without rewriting existing technology solutions? WPF Interop allows us to slowly introduce WPF by hosting WPF controls in an existing Win32 application.In this video, Todd Miranda demonstrates how to host a WPF control in a Win32 application.

Author: Todd Miranda

Duration: 19:59

Video Downloads:
WMV | WMV (Zip) | Zune | iPod | PSP | MPEG-4 | 3GP

Audio Downloads:
AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Sample Code:
VB | C#

You must Login to comment.Comments: 5

usna91: On August 2, 2008 8:01 PM said:

I appreciate/like the video.  But I downloaded it thinking it had something to do with hosting WPF in a Win32 -- that is Native -- application.  Never heard a Windows Forms app called that.  

Maybe that's just me.  But again, thanks for the great videos....Looking to use WPF to spice up some of my MFC apps....These videos really help to get one up the WPF curve quickly.

cheers,

tim

 

tmiranda: On August 7, 2008 1:31 AM said:

Tim,

  Glad you liked the video.  I am glad to hear you are using it in some of your MFC apps!  Good point on the naming.  I'll keep that in mind in the future so that it is a little more clear.  Thanks for the feedback.

Todd

 

alfrye: On December 18, 2008 2:57 PM said:

I appreciate the video. I have one question. Can you host wpf custom controls in a windows form?

The examples I have seen show hosting a usercontrol.

 

RostResh: On March 30, 2009 6:12 PM said:

usna91 ! You are absolutely right this is example show as - How host WPF in WinForm ,  so .NET in another .NET application. Win32Api is NATIVE windows application with NATIVE WinAPI, so it's HAVE

TO BE C/C++ and WinProc. Resume : change title or change content !!! And anyway Todd, if you can

show us how really use WPF in Win32Api( c++, not MFC !!! ) it's will be nice ! If not, explain why ?

Thanks

- Rost

 

pandagopal: On March 8, 2010 8:31 PM said:

I did exactly the same thing but i am getting This error "The calling thread must be STA, because many UI components require this"

 



Featured Item