WPF startup time
-
Hi, I have developed 2 windows in WPF . In Window1 Window_Loaded i have created the window2 like this so that the window2 controls will be intialized during startup itself private void Window_Loaded(object sender, RoutedEventArgs e) { Window Window2 = new Window(); } And iam only showing the window2 on the button click from window1, but the window2 display takes about 4 to 5 secs. Is there any thing do be taken care which iam missing. Thanks
-
Hi, I have developed 2 windows in WPF . In Window1 Window_Loaded i have created the window2 like this so that the window2 controls will be intialized during startup itself private void Window_Loaded(object sender, RoutedEventArgs e) { Window Window2 = new Window(); } And iam only showing the window2 on the button click from window1, but the window2 display takes about 4 to 5 secs. Is there any thing do be taken care which iam missing. Thanks
Without knowing what is done inside Window2 before it's allowed to be displayed, we can't help you.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Hi, I have developed 2 windows in WPF . In Window1 Window_Loaded i have created the window2 like this so that the window2 controls will be intialized during startup itself private void Window_Loaded(object sender, RoutedEventArgs e) { Window Window2 = new Window(); } And iam only showing the window2 on the button click from window1, but the window2 display takes about 4 to 5 secs. Is there any thing do be taken care which iam missing. Thanks
Is it really a Window ? Not a derived class ? I assume not. Try setting breakpoints in your code to see which part of the process is taking that long.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp