开发者

Is it possible to prevent a WPF control redraw?

开发者 https://www.devze.com 2023-02-06 01:54 出处:网络
I have to update multiple child controls in a WPF control. I don\'t want the control redrawn until I have updated al开发者_运维技巧l its child controls.If you are making all these updates on the UI th

I have to update multiple child controls in a WPF control. I don't want the control redrawn until I have updated al开发者_运维技巧l its child controls.


If you are making all these updates on the UI thread (which is typically the case), then the WPF framework will do exactly what you desire!

To test it out, create an infinite loop that continually updates your control and child controls. The UI will freeze up as a result.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号