.NET Framework Class Library for Silverlight
CompositionTarget..::.Rendering Event

Occurs when the core Silverlight rendering process renders a frame.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
Syntax

Visual Basic (Declaration)
Public Shared Event Rendering As EventHandler
Visual Basic (Usage)
Dim handler As EventHandler

AddHandler CompositionTarget.Rendering, handler
C#
public static event EventHandler Rendering
Remarks

Use the general EventHandler delegate for this event. Rendering uses the EventHandler delegate and EventArgs event data by its strict signature. However, you can base a handler on EventHandler and then cast the event data to RenderingEventArgs. Then you can get the RenderingTime property value for that occurrence of the event.

When the event occurs, it means that there is a frame of visuals available to render to the Silverlight content surface. You can then modify the visuals or any other aspect of your application on a per-frame basis within your handler.

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Tags :


Community Content

Thomas Lee
Remarks are incorrect
Although the delegate signature indicates that the event uses EventHandler and EventArgs, there actually is event data you can use. You do have to cast from within your handler to get at the information. Cast to RenderingEventArgs (System.Windows.Media namespace). RenderingEventArgs gives you a RenderingTime property with a frame rendering timestamp, which is sometimes useful. Ignore the Do Not Use notation in RenderingEventArgs documentation (that's wrong too). Doc will be updated in the near future.
Tags : contentbug

Page view tracker