Today, we found a small strange problem in one of our WPF applications, and we do not know exactly how to deal with this. When we run the software on one of our laptops, the screen goes to sleep (turns black) after a while, when there is no user interaction. This application itself is still busy downloading data from the Internet and filling out tables in the database. There is also a progress bar and a status bar.
If we wake up on the screen simply by moving the mouse, the program is displayed again, but some parts of the window are not updated. The progress bar still shows values, even if the process has completed and the status bar is also incorrect.
From now on, you can work with the program like nothing happened, but the progress bar and status bar will only redraw if you minimize the full window on the taskbar and enlarge it again. Or if you start another action that will also use a progress bar or status bar.
This strange behavior caused a lot of confusion, because the displayed data seems incorrect after the screen wakes up from sleep, and you need to minimize and maximize the window to see what is actually happening.
What is wrong here?
source
share