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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:22:51+00:00 2026-05-25T00:22:51+00:00

I am implementing an application with modelviewviewmodel, i have one view, where you can

  • 0

I am implementing an application with modelviewviewmodel, i have one view, where you can change all the properties of an object, this object is a property of a viewmodel from the view. But it also have te menu bar like windows, with file => open, new file, save, save as..
If i click on new file, the application have to make a total new object. It works fine, so the object is resetted. Every field and things becomes empty again. But now i want to implement a confirmation window, because if the user clicks accidently on new file, he loses everything. and in that confirmation window, i have 2 buttons, yes and no: yes, the application resets all the values, but if he clicks on no, the window just closes and the user can work further with the current object. My problem is with the yes button. It is a window, but the method, to create a new object, is in my viewmodel. So in my viewmodel is:

 this.Examination = new Examination();

Without confirmation, i just go from my view to this method in the viewmodel, but now how can i go from the confirmation window (after clicking on yes) to my viewmodel?

SOmeone who can help me out please?

  • 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-25T00:22:52+00:00Added an answer on May 25, 2026 at 12:22 am

    Create a command in your view model that creates the new object and bind the yes button to that command.

    <Button Command="{Binding CreateNewExaminationCommand, Source={x:Static viewmodel:ExaminationViewModel.Instance}}"></Button>
    
    // VIEWMODEL
        RelayCommand createNewExaminationCommand;
        public ICommand CreateNewExaminationCommand
        {
            get
            {
                if (createNewExaminationCommand== null)
                {
                    createNewExaminationCommand= new RelayCommand(param => this.CreateNew(),
                        param => this.CanCreateNew);
                }
                return createNewExaminationCommand;
            }
         }
    
         private ExaminationViewModel() {}
    
         private static readonly ExaminationViewModel instance = new ExaminationViewModel();
         public static ExaminationViewModel Instance
         {
               get {return instance;}
         }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am implementing an application, and when you start this application, you have a
I am implementing an application that launches iTunes from a 'music page'. This is
I am implementing an application, in which you have to validate if some object
I have an application implementing incremental search. I have a catalog of unicode strings
I'm currently implementing a client application that POST's a file over HTTP and have
I am implementing one application gust i am adding validations in login page implemented
I am implementing one application some fields are edittext in edittext clicking open mobile
I have implementing pdf application for ipad.Now i want to set brightness in my
hi i am implementing gallery application in this gallery circular order draging left to
I am implementing game application.In which i have set UIView on camara overly.When i

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.