Questa documentazione è stata archiviata e non viene gestita.

Evento CompositionTarget.Rendering

Occurs just before the objects in the composition tree are rendered.

Spazio dei nomi: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)
Spazio dei nomi XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public static event EventHandler Rendering
/** @event */
public static void add_Rendering (EventHandler value)

/** @event */
public static void remove_Rendering (EventHandler value)

In JScript è possibile gestire gli eventi definiti da una classe, ma non è possibile definirne di personalizzati.
<object Rendering="EventHandler" .../>

The Rendering event is routed to the specified event handler after animation and layout have been applied to the composition tree.

The Rendering event fires during the Windows Presentation Foundation (WPF) rendering process. The following example shows how you register an EventHandler delegate to the static Rendering method on CompositionTarget.

// Add an event handler to update canvas background color just before it is rendered.
CompositionTarget.Rendering += UpdateColor;

You can use your rendering event handler method to create custom drawing content. This event handler method gets called once per frame. Each time that Windows Presentation Foundation (WPF) marshals the persisted rendering data in the visual tree across to the composition tree, your event handler method is called. In addition, if changes to the visual tree force updates to the composition tree, your event handler method is also called. Note that your event handler method is called after layout has been computed. However, you can modify layout in your event handler method, which means that layout will be computed once more before rendering.

Microsoft .NET Framework 3.0 è supportato in Windows Vista, Microsoft Windows XP SP2 e Windows Server 2003 SP1.

.NET Framework

Supportato in:
Mostra: