Well, in the interest of updating the archives for any future interest in
the subject...

The key to getting this working is
System.Windows.Forms.Integration.ElementHost.  Just put it on your form, and
set the "Child" property with a  single instance of a WPF control.  No
collection here, just a single control.  Not a big deal since you can simply
use one of the WPF panels to provide a single rooted control hierarchy.

The only weirdness I've run into so far is that the VS Designer treats it as
a Component rather than a Control (it shows up in the tray, not on the
form).  Simply adding it to the Controls Collection in the Designer.cs file
corrects this and you can then see it on the form in the designer.  That or
just write the code and forget the designer...

Anyway, thanks for the suggestions.  Looks like this will work well for my
needs.


Russ


-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Russ Alan
Sent: Friday, July 27, 2007 3:51 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Dynamic remote UI - XAML?

Devil lurking?  In my experience, always...

I'll be ordering that book.  Thanks!

Russ

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Curt Hagenlocher
Sent: Friday, July 27, 2007 3:32 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Dynamic remote UI - XAML?

On 7/27/07, Russ Alan <[EMAIL PROTECTED]> wrote:
>
>
> Is there a problem with hosting a XAML/WPF panel on a common 2.0
> System.Windows.Form?  Seems it shouldn't be an issue.


I don't have it handy here, but Adam Nathan's WPF book covers this.  Interop
with Windows Forms looks pretty straightforward from what I can remember,
but I'm sure there's a devil lurking in those details.

--
Curt Hagenlocher
[EMAIL PROTECTED]

===================================
This list is hosted by DevelopMentorR  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to