1

I am using Caliburn Micro for Implementing MVVM in WPF.

I have a static class named JIMSMessageBox, there is also a ViewModel named MessageViewModel.

Actually these classes helps me insead of the normal MessageBox.

I used to call the JIMSMessageBox by

JIMSMessageBox.Show("Hello World!");

But, now i also want to implement an ConfirmBox in the same class JIMSMessage. But my problem is when i show the user a confirm box, he may accept or reject. so if the user clicks OK in the MessageWindow, i have to return true to JIMSMessage.Confirm, else if click Cancel, i have to return false.

How can i implement this using Caliburn Micro.

I need to have the JIMSMessage as a static class.

Kishore Kumar
  • 12,675
  • 27
  • 97
  • 154

1 Answers1

0

You should be able to do something similar to my answer on this question https://stackoverflow.com/a/10604692/263665.

You could pass a reference to your view model into your static method to help display a custom view for the "confirm" functionality and storing the state/result.

Community
  • 1
  • 1
Megan
  • 2,534
  • 1
  • 17
  • 15