0

I'm using popup to show my user control. I want to detect when the popup is REALLY shown up on the screen, then I show the progress bar, do some work, then hide the progress bar

MyDialog dialog = new MyDialog();
myPopup.Child = dialog;
myPopup.IsOpen = true;

dialog.progressLoading.Visibility = Visibility.Visible;
Thread.Sleep(3000)
dialog.progressLoading.Visibility = Visibility.Collapsed;

However, I realize that IsOpen = true doesnot show the popup instantly. The fact is that I must wait 3 seconds for it to show up.

How to know when popup shows up ?

onmyway133
  • 45,645
  • 31
  • 257
  • 263
  • Can you post code for the MyDialog class! Can't know what takes so long to initialize dialog. – Master Chief Nov 24 '12 at 09:59
  • @MasterChief MyDialog is just a user control. The popup takes 3 seconds to show up because I call Thread.Sleep(3000). What I want to demonstrate here is that popup doesnot show instantly ! – onmyway133 Nov 24 '12 at 13:11

0 Answers0