Qusyaire Ezwan
Qusyaire Ezwan

Reputation: 279

Create GUI windows like wizard windows for windows form in c#

I like to create GUI like wizard for my program. I don't know how to explain. But the user just click "next" for next process and end with "Done" button at the last process. How do i can create this on in Windows Form C#?

eg: enter image description here

Upvotes: 1

Views: 1461

Answers (2)

David
David

Reputation: 16277

For each of your wizard page, you can create a user control, for instance page1, page2, etc. you can then add them into a collection:

List<Page> allPages= new List<Page>();
foreach( var page in allPages)
    page.hide();

And when you click "Next", you increment the counter:

void onNextClicked(...)
{
    current++;
    allPages[current].Show();
}

That is it. Of course, the above is the pseudo code. Cheers!

Upvotes: 1

Dan Bystr&#246;m
Dan Bystr&#246;m

Reputation: 9244

You just stack a bunch of panels on top of each other and place the content of each step in separate panels. Then, as the users clicks Next or Prev, you show/hide the different steps by setting the .Visible property of the panels accordingly.

Upvotes: 3

Related Questions