WPf Loading screen
I have window with loading icon. In application I do li开发者_运维问答ke this
// create loading window
loadingWindow.Show();
//do some operations
loadingWindow.Visibility = Visibility.Hide;
loading window is not showing.
Can you tell me guys what I do wrong?
Maybe this will give you some help in the right direction. I believe you have to use threads to get the loading effect.
Edit: You show the loadingWindow, then you do operations and then you hide the loadingWindow. Since there is nowhere stated that the app should wait with making the loadingWindow hidden till the operations are done it won't show up. If you look at the link I posted you should get a general idea of how to make a loadingscreen. If it so happens to be you do need help with it, just say so in a comment.
Hope it helps.
If you want a splash screen, use the SplashScreen class.
Note that it can only display an image, so it's not suitable if you need something more complex (e.g. animations or interactivity)
精彩评论