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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:47:02+00:00 2026-06-08T05:47:02+00:00

I have ViewModel1 and View1 associated with it. I start dialog window from ViewModel2

  • 0

I haveViewModel1 and View1 associated with it. I start dialog window from ViewModel2 (some another viewmodel) using IWindowManager object. The code from ViewModel2 class:

windowManager.ShowDialog(new ViewModel());

So, I have Dialog Window with View1 user control.

My answer is next – I can close that dialog window using red close button, but how to close it using my specific button (contained in View1 user control), something like “Cancel” button with close command (Command={Binding CancelCommand}), CancelCommand of course is contained in ViewModel1 class.

  • 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-08T05:47:04+00:00Added an answer on June 8, 2026 at 5:47 am

    It’s even easier if your view model extends Caliburn.Micro.Screen:

    TryClose();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have public class ViewModel1 { // some properties here public List<ViewModel2> ViewModel2 {get;
I have a class that is a viewmodel (using Prism). It has an associated
I have a DatePicker working on a View which also has a ViewModel associated
i have the code for View and the ViewModel below and some how the
Do you think it is alright from architectural stand-point to have ViewModel - View
I am using MVC-Viewmodel with repository pattern with EF on my project. I have
I want to have a command from my view model associated with F8, and
I'm trying to learn how to separate a view from its associated viewmodel, while
I have a ViewModel that can create another ViewModel. I want to set this
OK, i am creating a web application. I am using MVC3. I have ViewModel

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.