Represents the display surface of your application.
Namespace:
System.Windows.Media
Assembly:
PresentationCore (in PresentationCore.dll)
Visual Basic (Declaration)
<UIPermissionAttribute(SecurityAction.InheritanceDemand, Window := UIPermissionWindow.AllWindows)> _
Public MustInherit Class CompositionTarget _
Inherits DispatcherObject _
Implements IDisposable
Dim instance As CompositionTarget
[UIPermissionAttribute(SecurityAction.InheritanceDemand, Window = UIPermissionWindow.AllWindows)]
public abstract class CompositionTarget : DispatcherObject,
IDisposable
[UIPermissionAttribute(SecurityAction::InheritanceDemand, Window = UIPermissionWindow::AllWindows)]
public ref class CompositionTarget abstract : public DispatcherObject,
IDisposable
public abstract class CompositionTarget extends DispatcherObject implements IDisposable
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.
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
.png)
For more information, see Performance Profiling Tools for WPF.
System..::.Object
System.Windows.Threading..::.DispatcherObject
System.Windows.Media..::.CompositionTarget
System.Windows.Interop..::.HwndTarget
System.Windows.Media..::.VisualTarget
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
Reference
Other Resources