Answered by:
Silverlight app closed unexpectedly

Question
-
i'm using SL3 I have a login page, evry time after i click login btn my browser unexpectedly closing.
there is no out bug and app not closing if i debuging app by breakpoint step by step there is nothing happen and browser not closing
what may cause that strange behaviour.
Xusan.
thanks in advance
Wednesday, October 28, 2009 4:41 AM
Answers
-
Great.
You can check this for themes:
HTH
Wednesday, October 28, 2009 7:50 AM
All replies
-
Hi,
Can you please put the breakpoint on the Method:
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)in App.xaml.cs and check there details in "e".
Hope that helps.
Wednesday, October 28, 2009 4:47 AM -
thanks for you reply varshavman.
yes i did that
but it did not hit.
Wednesday, October 28, 2009 5:48 AM -
Can you please post your login code?
Wednesday, October 28, 2009 6:09 AM -
I think I understand what the caseafter i comment this code app run finepublic static void ShowTheme(this FrameworkElement controlToApply)
{
// ImplicitStyleManager.SetResourceDictionaryUri(controlToApply, uri); // ImplicitStyleManager.SetApplyMode(controlToApply, ImplicitStylesApplyMode.OneTime); // ImplicitStyleManager.Apply(controlToApply);}
In my project after login app initilize 10 UserControl simultaneously and that calls over 36 ShowTheme() method due to the fact that it take much time to walk all the tree for applying theme therefor it crashes.
i think i should do initialization asynchronously.
Wednesday, October 28, 2009 6:57 AM -
Great.
You can check this for themes:
HTH
Wednesday, October 28, 2009 7:50 AM