Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Navigation Application in Window

 
 
Old 04-09-2007   #1 (permalink)
hufaunder@yahoo.com


 
 

Navigation Application in Window

I have an app that could benefit from WPF's Navigation Application.
Unfortunately, whenever I create a "XAML Broswer Application" the
resulting application runs in IE. I would like it to run in a regular
winodw. How do I go after doing that? Should I use "Windows
Application"? If so then how do I get the navigations?

Thanks


My System SpecsSystem Spec
Old 04-09-2007   #2 (permalink)
Bryan Phillips


 
 

Re: Navigation Application in Window

Navigation is meant for IE. If you are looking to create wizard style
functionality, look at Microsoft's User Interface Process (UIP)
Application Block.

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



"hufaunder@yahoo.com" <hufaunder@yahoo.com> wrote in message
news:1176147775.657012.244310@p77g2000hsh.googlegroups.com:

> I have an app that could benefit from WPF's Navigation Application.
> Unfortunately, whenever I create a "XAML Broswer Application" the
> resulting application runs in IE. I would like it to run in a regular
> winodw. How do I go after doing that? Should I use "Windows
> Application"? If so then how do I get the navigations?
>
> Thanks


My System SpecsSystem Spec
Old 04-09-2007   #3 (permalink)
Plamen Ratchev


 
 

Re: Navigation Application in Window

Yes, you have to use Windows Application (WPF) project. And then just create
a NavigationWindow for container and add Pages. You can use the Navigate
method, Hyperlinks, or the journal to implement navigation.

Here is an example (I posted this some time ago to reply to another
problem). Very basic, just create a Windows Application (WPF) project and
create the files as listed below:

// file: App.xaml
// Main application.

<Application x:Class="NavigationTest.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Container.xaml"
>

<Application.Resources>

</Application.Resources>
</Application>

// file: Container.xaml
// This is the NavigationWindow that will host your pages.

<NavigationWindow x:Class="NavigationTest.Container"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="NavigationTest" Height="300" Width="300"
Source="Main.xaml"
>

</NavigationWindow>

// file: Main.xaml
// This is the main/default page.

<Page x:Class="NavigationTest.Main"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Main"
>

<Grid>
<Button Click ="Next_Click" Content="Next" />
</Grid>
</Page>

// file: Main.xaml.cs
// Code to handle the button click which will navigate to next page.

namespace NavigationTest
{
public partial class Main : System.Windows.Controls.Page {
public Main() {
InitializeComponent();
}

private void Next_Click(object sender, RoutedEventArgs e) {
// This is where you create an instance of the next page and
navigate to it.
NextPage next = new NextPage();
this.NavigationService.Navigate(next);
}
}
}

// file: NextPage.xaml
// This is the next page that you will navigate to.

<Page x:Class="NavigationTest.NextPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="NextPage"
>

<Grid>
<TextBlock>This is the next page.</TextBlock>
</Grid>
</Page>


HTH,

Plamen Ratchev
http://www.SQLStudio.com


My System SpecsSystem Spec
Old 04-10-2007   #4 (permalink)
Laurent Bugnion [MVP]


 
 

Re: Navigation Application in Window

Hi,

Bryan Phillips wrote:
> Navigation is meant for IE.


That's incorrect. You can have a NavigationWindow running as standalone
application, and use the navigation service to load new pages. Instead
of running the Page, simply place the Page in a NavigationWindow.

> If you are looking to create wizard style
> functionality, look at Microsoft's User Interface Process (UIP)
> Application Block.


Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
My System SpecsSystem Spec
Old 04-11-2007   #5 (permalink)
Bryan Phillips


 
 

Re: Navigation Application in Window

Doh! Sorry. I did not know what I was thinking.

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
Web Site: http://www.composablesystems.net



"Laurent Bugnion [MVP]" <galasoft-lb@bluewin.ch> wrote in message
news:Oe09zy6eHHA.3932@TK2MSFTNGP02.phx.gbl:

> Hi,
>
> Bryan Phillips wrote:
> > Navigation is meant for IE.

>
> That's incorrect. You can have a NavigationWindow running as standalone
> application, and use the navigation service to load new pages. Instead
> of running the Page, simply place the Page in a NavigationWindow.
>
> > If you are looking to create wizard style
> > functionality, look at Microsoft's User Interface Process (UIP)
> > Application Block.

>
> Greetings,
> Laurent
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering, Blog: http://www.galasoft-LB.ch
> PhotoAlbum: http://www.galasoft-LB.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Unclosable navigation window on startup General Discussion
navigation pane in window Vista file management
Folder Window Navigation Failure Vista performance & maintenance
navigation to webpage cancled window will not close Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46