Hosting Wpf in windowsForms

When hosting a Wpf in windowsForms Is it possible to maintain the relative path to underlying page ( Pagenavigation ) using frame source , I cant get it to work .. only load in one page .. After that I seem to loose the path to other page in my wpf app.

My goal is to have a wpf page containing a menu and a frame for loading other wpf-pages .. hosted in a winforms app .

( How ) Can this be achieved ?

Please helpSmile

[536 byte] By [Boman] at [2008-1-4]
# 1
Are you trying to keep a history or just a list? The Navigated event on the frame has the Uri of the page that was loaded for example.
WPCoder at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 2

My problem is to just get the wpf to load the pages .. made a little example file


http://jens-christian-jensen.dk/wpf/WPFinVB.zip

I would just like to make my wpf load other pages when hosted i a winform

Do you know hows its done ?

Boman at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 3
The pack syntax gets trickier when dealing with referenced assemblies:

Me.currentPage.Navigate(New Uri("/" + Me.GetType().Assembly.GetName().Name + ";component/Page1.xaml", UriKind.Relative))

The thing I did here was simply get the name of the assembly where the xaml pages are defined. Then using the pack syntax, specify the name of the Page. The ;component syntax is necessary.

WPCoder at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 4

Thank you for the quick reply .. really helpfull !!!

Boman at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified