开发者

CompositionTarget.Rendering event for Windows Form?

开发者 https://www.devze.com 2023-02-01 00:05 出处:网络
This code is in WPF: CompositionTarget.Rendering += new EventHandler(Update); CompositionTarget.Rendering += new EventHandler(Draw)开发者_运维知识库;

This code is in WPF:


CompositionTarget.Rendering += new EventHandler(Update);
CompositionTarget.Rendering += new EventHandler(Draw)开发者_运维知识库;

I would like to translate do Windows Form. Can I do this? Thank you.


The closest equivalent is the Form.Paint event. It isn't exactly a very good match, each control in Winforms gets its own event. A fundamental difference between WPF and Winforms. A child control may need to paint itself (compare Control.Invalidate) without the parent ever getting the event.

0

精彩评论

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