Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 602457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:49:30+00:00 2026-05-13T16:49:30+00:00

I am building my own implementation of a wizard style interface and struggling to

  • 0

I am building my own implementation of a wizard style interface and struggling to get it working correctly, along with every other style of wizard interface I expect to encounter the same problem. See image:

Basically I am using a grid and have my navigation elements below that. The grid will switch the screens, like so:

private void btnNext_Click(object sender, RoutedEventArgs e)
{
    Wizard.Progress++;
    SwitchUserControl();
}

private void SwitchUserControl()
{
    switch (Wizard.Progress)
    {
        case 0:
            contentGrid.Children.RemoveRange(0, contentGrid.Children.Count);
            contentGrid.Children.Add(screen0);
            break;
        case 1:
            contentGrid.Children.RemoveRange(0, contentGrid.Children.Count);
            contentGrid.Children.Add(screen1);
            break;
        case 2:
            contentGrid.Children.RemoveRange(0, contentGrid.Children.Count);
            contentGrid.Children.Add(screen2);
            break;
        case 3:
            contentGrid.Children.RemoveRange(0, contentGrid.Children.Count);
            contentGrid.Children.Add(screen3);
            break;
    }
}

This is where I get to the problem:

That works fine to switch among the controls. The problem is, say for example on of the screens says enter a date. And I have some data validation code to run on that text field. If validation fails the textbox border goes red and a message appears. But now I don’t know where this code can go. I used to have it on the button on the usercontrol screenX, but now my navigation buttons are below, and then if I want to put it on the code under those nav buttons, I can’t access the textfield!

I also see this problem occuring in most implementations of wizard style interface. Most examples I see use check boxes or radio buttons so there is no error in data input. But that is not very helpful to this example.

So what are my options to achieve what I want here???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:49:30+00:00Added an answer on May 13, 2026 at 4:49 pm

    The answer to your question might be to start over with a more canonical approach. WPF supports a nice Navigation API that you can use for building wizards. Here is a sample of it at work.

    With respect to validation, in the Navigation API you can use a Page class in the stead of your controls (from your example). Your Page class can have a property indicating whether it is valid or invalid and you can keep the logic of field by field input validation specific to the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im building an own php framework. I saw in other frameworks there are even
I am building my own home page. I find someone's page good, and downloaded
I am building my own torrent site and after doing some research I have
I am building my own local search UI element that gives local search suggestions
I'm currently building my own login script and have noticed that most append the
We've just started building our own push notification system (due to client's requirement) for
I am learning a lot about design patterns when I am building my own
I am currently building a webshop for my own where I want to increment
I am building a website templating system where multiple user can create their own
So lately I've been thinking of building and implementing my own invoice system with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.