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.
精彩评论