View Full Version : C# and WPF

05-29-2008, 11:01 PM
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

06-02-2008, 06:24 PM
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)

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