Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-29-2008, 10:01 PM   PM User | #1
kansurr
New Coder

 
Join Date: Jul 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
kansurr is an unknown quantity at this point
C# and WPF

I am trying to make an application, and I want to have a menu at the top, and then when i click on lets say Start on the menu bar, it changes the window, so that it still has the menu at the top but everything else has changes. I dun want to remake the window, and i dun want to have all of the things in code and just change the visibility.

here is what i thought would work, creating UserControls and then change the UserControl.

UserControl replace = new CreatePage();
this.C = replace;

CreatePage is a page that asks for a bunch of items. Please let me know what i should do.

I do not get any sort of error, but nothing actually changes. Thanks for everyone helps
kansurr is offline   Reply With Quote
Old 06-02-2008, 05:24 PM   PM User | #2
kansurr
New Coder

 
Join Date: Jul 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
kansurr is an unknown quantity at this point
you kinda answered my question. here is my main predicament. I want to have a starting window. if you click a button it will show you something different. this different thing is called, and is a UserControl.

How it is Called:

void New_Click(object sender, RoutedEventArgs e)
{
this.Grid.Children.Remove(UC);
this.Grid.Children.Add(create);
}

create was already initialized up top, and it has its own xaml and code behind file.

So now the window is populated with all the original information but instead of UC in the main text area, i have put this new createplayer UserControl. Now its going to fill out some information in a form. then you would hit a submit button. I then want it to go back so that UC is the UserControl not create. Everything you entered into this form, is then saved into a class.

What is the best way to do this? Let me know if anything is unclear
kansurr is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


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

Forum Jump


All times are GMT +1. The time now is 09:50 PM.


Advertisement
Log in to turn off these ads.