This documentation is archived and is not being maintained.

CompositionTarget Class

Represents the display surface of your application.

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

<UIPermissionAttribute(SecurityAction.InheritanceDemand, Window := UIPermissionWindow.AllWindows)> _
Public MustInherit Class CompositionTarget _
	Inherits DispatcherObject _
	Implements IDisposable
Dim instance As CompositionTarget
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

CompositionTarget is a class that represents the display surface on which your application is being drawn. The WPF animation engine provides many features for creating frame-based animation. However, there are application scenarios in which you need control over rendering on a per frame basis. The CompositionTarget object provides the ability to create custom animations based on a per-frame callback.


For a complete code sample using CompositionTarget, see Using the CompositionTarget Sample.

Using Perforator to Analyze Rendering Behavior

Perforator is a WPF performance profiling tool for analyzing rendering behavior. Perforator displays a set of values that allow you to analyze very specific rendering behavior in parts of your application. In this case, Perforator shows a rendering frame rate of 60 frames per second for the PhotoDemo sample application.

Perforator main window

Perforator main window with rendering data

For more information, see WPF Performance Suite.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0