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 8027447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:48:54+00:00 2026-06-04T23:48:54+00:00

I know there are many questions regarding how a ViewModel should open a dialog

  • 0

I know there are many questions regarding how a ViewModel should open a dialog box, how does the Model launch dialogs?

Should the model call a dialog service, that call the viewmodel’s dialog service, all the way up to the view? Should the model have a reference to the mvvm-light toolkit?

Specifically for my situation – when my model is passed some data to restore / interpret and build model objects (I think this should be the model’s job) – there is potential for errors to be raised.


Update #1: I’ve accepted the answer below, based on the comments from fmunkert. I’ve realized that I was asking the wrong question, and the fundamental problem is designing a paradigm for the model to signal errors.

  • 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-06-04T23:48:55+00:00Added an answer on June 4, 2026 at 11:48 pm

    Since MVVM is not a standard and since there is no definitive authority that decides what is correct in MVVM and what is not, you can implement dialog boxes in any way you see appropriate, as long as you do not call any WPF dialogs directly from the ViewModel or model.

    In the applications I recently wrote, I used the following two approaches (with my own MVVM framework library):

    • Modal dialogs are called from the ViewModel via a “service”. I.e. the ViewModel has a way to obtain an IFrontend pointer with a ShowModalDialog() method. There are two generic implementations for IFrontend: one for WPF (which opens a dialog) and one for the unit test environment (which just simulates a dialog).

    • Non-modal dialogs sometimes can be opened without the ViewModel knowing about them. E.g. if you have a ViewModel for a form where you need to be able to open a font selection dialog, then this is a user interface detail and the ViewModel does need to know about that detail. The ViewModel does not care whether the font is selected using a dialog or using a drop-down list.

    If you are using third-party libraries like MVVM Light or Prism, you probably should follow the recommendations from the library’s documentation.

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

Sidebar

Related Questions

I know there are many questions regarding font installation on android emulator. I'm sharing
Ive had a look at many other questions regarding this (I know there are
First thing first, I know there are many questions regarding python and lxml on
Before you start reading... You should know that there are many questions below... I
I know there are many questions similar but any of them didn't help. in
NOTE: I know there are many questions that talked about that but I'm still
I know there are already many questions like mine but I found no answer
I know that there are many questions about this but I cannot make it
I know that there are many different questions about this sort of topic on
First of all: I do know that there are already many questions and answers

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.