PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

Application with multiple WPF forms

 
 
Andy
Guest
Posts: n/a
 
      4th Mar 2009
I am trying to create an application with multiple wpf forms. What I would
like is a main menu type form with a button - "Load Other Screen".

What would the code be for the Click Event. I have tried
LoadOtherScreen win = new LoadOtherScreen();
win.show();

But in WPF SHOW is not valid

I did this.Conent = win; which worked, however in the other screen, I
couldn't get back to the main screen. The same code gave me an error about
not being part of a child...

Is this possible? Or am I missing the whole idea of WPF?

Thanks
 
Reply With Quote
 
 
 
 
Sean
Guest
Posts: n/a
 
      27th Mar 2009
Hi Andy...

I am having the same problem but have a partial solution for you...

use a wrappanel, have a navigation procedure that assigns that new
usercontrol to the wrop panel.... i.e.


XAML
<WrapPanel x:Name="mainPanel" Margin="0,47,0,12" Grid.RowSpan="2">

</WrapPanel>

Code:
public void Navigate(UserControl NextPage)
{
mainPanel.Children.Clear();
mainPanel.Children.Add(NextPage);
//this.Content = NextPage;
}

the wrappanel is housed in the main usercontrol with all the menus that take
you to different pages...

there is a problem thou with size issues that I am still trying to get
around, will let you know if I get a better way


"Andy" wrote:

> I am trying to create an application with multiple wpf forms. What I would
> like is a main menu type form with a button - "Load Other Screen".
>
> What would the code be for the Click Event. I have tried
> LoadOtherScreen win = new LoadOtherScreen();
> win.show();
>
> But in WPF SHOW is not valid
>
> I did this.Conent = win; which worked, however in the other screen, I
> couldn't get back to the main screen. The same code gave me an error about
> not being part of a child...
>
> Is this possible? Or am I missing the whole idea of WPF?
>
> Thanks

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple login forms in one web application Sergey Kuleshov Microsoft ASP .NET 3 12th Mar 2008 05:54 PM
Multiple simulataneous forms in a sinlge application Peter Oliphant Microsoft VC .NET 20 2nd Dec 2005 10:39 PM
Multiple forms with Multiple application using formstack Chintan Microsoft Dot NET Compact Framework 1 7th Apr 2005 04:46 PM
Application with multiple windows forms =?Utf-8?B?VGVjaHN0dWRlbnQ=?= Microsoft Dot NET Framework Forms 4 14th Oct 2004 05:55 PM
New application with multiple forms in VB.NET CF deBeuk Microsoft Dot NET Compact Framework 1 11th Feb 2004 02:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:03 PM.