简体   繁体   中英

How to force the refresh of the thumbnail when the window is minimized ? (C# WPF)

In the code of my application, I created a function that minimizes the window then changes the appearance of it. But as long as the application is minimized, the taskbar thumbnail displays the window as it was before the function was called.

How to force the refresh of the thumbnail when the window is minimized?

Here is the simplified code:

MyWindow.WindowState = WindowState.Minimized;
MyWindow.Background = Brushes.Blue;
MyWindow.RenderTransform = new ScaleTransform(1, 0.5);

This is a function of the OS and is not something you can control. At one time Windows did do live updates to the taskbar thumbnail, but removed it for performance reasons.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM