I have a Silverlight application (edit: an Out-of-browser application with elevated trust) which must open a ChildWindow (for login purpose). When I (try to) call the event from the main (or any function called in the main), with the code below, nothing happens.
var credentials = new Credentials();
credentials.Closed += new EventHandler(Credentials_Closed);
credentials.Show();
I tried with a small test application and it was not working either. But then I tried to call the event from a Button_Click event... surprise, it works ! It also works when called by a DispatcherTimer.
I thought maybe it will works if I start it in another thread but it didn't solve the issue...
Your help will be very appreciated !
Philippe
Source : Why Won't the Silverlight ChildWindow Display?
For the test program : www.philippebellefeuille.com/StackOverflow/8074918/BugChildWindowInMain.rar