System.Windows.Media Namesp ...


.NET Framework Class Library
CompositionTarget Class

Represents the display surface of your application.

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

Visual Basic (Declaration)
<UIPermissionAttribute(SecurityAction.InheritanceDemand, Window := UIPermissionWindow.AllWindows)> _
Public MustInherit Class CompositionTarget _
    Inherits DispatcherObject _
    Implements IDisposable
Visual Basic (Usage)
Dim instance As CompositionTarget
C#
[UIPermissionAttribute(SecurityAction.InheritanceDemand, Window = UIPermissionWindow.AllWindows)]
public abstract class CompositionTarget : DispatcherObject, 
    IDisposable
Visual C++
[UIPermissionAttribute(SecurityAction::InheritanceDemand, Window = UIPermissionWindow::AllWindows)]
public ref class CompositionTarget abstract : public DispatcherObject, 
    IDisposable
JScript
public abstract class CompositionTarget extends DispatcherObject implements IDisposable
XAML
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.
Remarks

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.

NoteNote:

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 Performance Profiling Tools for WPF.

Inheritance Hierarchy

System..::.Object
  System.Windows.Threading..::.DispatcherObject
    System.Windows.Media..::.CompositionTarget
      System.Windows.Interop..::.HwndTarget
      System.Windows.Media..::.VisualTarget
Thread Safety

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

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Other Resources

Tags :


Page view tracker