0

consider the flowing scenario

chequeInfo = new Check();
                Messenger.Default.Register<Check>(this, (a) => this.doSomething(a));
                AddNewCheck j = new AddNewCheck();
                _dialogService.showDialoge(j);
                Console.WriteLine("this text doesn't show up");
                SpecialCustomerPayments d = new SpecialCustomerPayments();                  
                d.chequeId = chequeInfo.Id;
                d.paymentAmount = chequeInfo.value;
                d.userId = 1;
                ....

as you can observe from code above I'm showDialog() another window in the middle of a method , I expected the flow to continue after I done with the new window , but it is not , I think I'm missing something obvious here, any help will be much appreciated

thanks in advance

Musaab
  • 805
  • 2
  • 13
  • 30

1 Answers1

1

ShowDialog() is a blocking call.
It will only return when the new window is closed.

If you want it to return immediately and leave the window open, call .Show().

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • thanks for the reply , do u mean after closing the new window , the rest of the method will execute ? that is what I actually expected and that is not happening , I checked using a Console.WriteLine("") – Musaab Jul 08 '11 at 19:16
  • Then you're probably getting an exception. Click Debug, Exceptions, and check all of the boxes. – SLaks Jul 08 '11 at 19:21