WPF apps using .NET 2.0 assemblies? Can it be done?

E

eljainc

Hello,

I am writing some basic WPF applications using VS 2005 with the WPF
extensions. I am building a specific WPF application which uses WPF
Windows (not Winforms). I notice that .NET 2.0 components cannot be
used on these forms. Is there any way to shoehorn the .NET 2.0
components on to a WPF form? If I had the source code to these
assemblies, could they be published to a .NET 3.0/3.5 assembly so that
it would work on the WPF Window?

Thanks.
Mike
 
R

RobinS

I'm not 100% sure, but I think you can combine WinForms and WPF Windows in
the same application, but I don't think you can interchange the controls.
You might want to post this question in the MSDN Forum for WPF.

RobinS.
GoldMail, Inc.
 
D

Damien

Hello,

I am writing some basic WPF applications using VS 2005 with the WPF
extensions. I am building a specific WPF application which uses WPF
Windows (not Winforms). I notice that .NET 2.0 components cannot be
used on these forms. Is there any way to shoehorn the .NET 2.0
components on to a WPF form?  If I had the source code to these
assemblies, could they be published to a .NET 3.0/3.5 assembly so that
it would work on the WPF Window?

Thanks.
Mike

Hi Mike,

Have you looked at the WindowsFormsHost from
System.Windows.Forms.Integration? It lets you put the WinForms
controls inside WPF, which I think is what you're asking for.

Damien
 
R

RobinS

Hello,

I am writing some basic WPF applications using VS 2005 with the WPF
extensions. I am building a specific WPF application which uses WPF
Windows (not Winforms). I notice that .NET 2.0 components cannot be
used on these forms. Is there any way to shoehorn the .NET 2.0
components on to a WPF form? If I had the source code to these
assemblies, could they be published to a .NET 3.0/3.5 assembly so that
it would work on the WPF Window?

Thanks.
Mike

Hi Mike,

Have you looked at the WindowsFormsHost from
System.Windows.Forms.Integration? It lets you put the WinForms
controls inside WPF, which I think is what you're asking for.

Damien

==========================

Damien,

What about the other way around? Will it let you put WPF controls on a
Windows form?

RobinS.
 
D

Damien

Hi Mike,

Have you looked at the WindowsFormsHost from
System.Windows.Forms.Integration? It lets you put the WinForms
controls inside WPF, which I think is what you're asking for.

Damien

==========================

Damien,

What about the other way around? Will it let you put WPF controls on a
Windows form?

RobinS.

There is a similar control that lets you do that. Typing "host wpf
winforms" into google found an MSDN walkthrough as the first link.

Damien
 
R

RobinS

Hi Mike,

Have you looked at the WindowsFormsHost from
System.Windows.Forms.Integration? It lets you put the WinForms
controls inside WPF, which I think is what you're asking for.

Damien

==========================

Damien,

What about the other way around? Will it let you put WPF controls on a
Windows form?

RobinS.

There is a similar control that lets you do that. Typing "host wpf
winforms" into google found an MSDN walkthrough as the first link.

Damien
----------------------


Brilliant. Thanks.
RobinS.
GoldMail, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top