开发者

CompositionTarget.Rendering event for Windows Form?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜