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

  • Home
  • SEARCH
  • 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 4013568
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:23:16+00:00 2026-05-20T09:23:16+00:00

I want to create a Wizard in my Silverlight MVVM application. The Wizard should

  • 0

I want to create a “Wizard” in my Silverlight MVVM application. The Wizard should contain multiple steps between which you can navigate using “next” and “previous”.
The problem I am facing is the relationship between views and view models.
I want there to be a view and view model for the Wizard itself. My instinct tells me that there should be one view/view model pair for each step in the wizard.

What is a good approach for maintaining these kinds of relationships, where one view model holds several other view models and the view actually consists of several smaller views?
Are there any patterns or practices that I can use?

I know this question might be subjective, but give me the rough cuts of an approach and I’ll award you an answer!

  • 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-20T09:23:16+00:00Added an answer on May 20, 2026 at 9:23 am

    I’d propose main wizard viewModel which has a collection of steps view models and handles navigation between them. While navigating it should call validation methods in step viewModels:

    WizardVM:

    public class WizardVM
    {
         // this commands should support CanExecute
         public ICommand GotoNextCommand { get; private set; } // should open next step VM
         public ICommand GotoBackCommand { get; private set; } // should open previous step VM
    
         // this prop should be set by 'GotoNext', 'GotoBack' commands
         public object CurrentStep { get; private set; }
    
         // probably internally you will have a list of all steps:
         private ICollection<object> _stepViewModels = ...;
    }
    

    WizardView:

    <StackPanel>
        <ContentPresenter Content="{Binding CurrentStep}">
        <StackPanel Orientation="Horizontal">
            <Button Command="{Binding GotoBackCommand}">Back</Button>
            <Button Command="{Binding GotoNextCommand}">Next</Button>
        </StackPanel>
    </StackPanel>
    

    UPDATE:

    Views can be coupled with ViewModels via Datatemplating. For example add this into resources in App.Xaml:

    <DataTemplate DataType="{x:Type local:Step1ViewModel}">
         <Step1View />
    </DateTemplate>
    <DataTemplate DataType="{x:Type local:Step2ViewModel}">
         <Step2View />
    </DateTemplate>
    

    Your viewModels should know absolutely nothing about views. It means that WizardVM should
    expose only other viewModels but not views. It’s a rule of thumb for MVVM.

    UPDATE2 Oops, I forgot that Silverlight doesn’t have DataTemplating yet. In silverlight I would still expose ViewModels but bind them to ContentPresenters using a converter which will convert a viewModel into corresponding view.

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

Sidebar

Related Questions

I want to create a Java application bundle for Mac without using Mac. According
I want to create a wizard that includes a few steps, that in the
I want to create the report in my application using the reportViewer control. I
I want to create a 'new project' wizard for my application. The first page
I want to create an allocator which provides memory with the following attributes: cannot
I want to create my Rails application with MySQL, because I like it so
I want to create a custom project template with wizard i.e. when I create
I want to create a Java-project in a subfolder of the workspace-directory. The wizard
I've got an application which i want users to be able to enter alphanumeric
I want to create a simple web service in Eclipse (Helios J2EE), using Apache

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.