CompositionTarget CompositionTarget CompositionTarget CompositionTarget Class


Represents the display surface of your application.

public ref class CompositionTarget abstract : System::Windows::Threading::DispatcherObject, IDisposable
public abstract class CompositionTarget : System.Windows.Threading.DispatcherObject, IDisposable
type CompositionTarget = class
    inherit DispatcherObject
    interface IDisposable
Public MustInherit Class CompositionTarget
Inherits DispatcherObject
Implements IDisposable


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.


Dispatcher Dispatcher Dispatcher Dispatcher

Gets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
RootVisual RootVisual RootVisual RootVisual

Gets or sets the root visual of the CompositionTarget.

TransformFromDevice TransformFromDevice TransformFromDevice TransformFromDevice

Gets a matrix that can be used to transform coordinates from the rendering destination device to this target.

TransformToDevice TransformToDevice TransformToDevice TransformToDevice

Gets a matrix that can be used to transform coordinates from this target to the rendering destination device.


CheckAccess() CheckAccess() CheckAccess() CheckAccess()

Determines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
Dispose() Dispose() Dispose() Dispose()

Disposes CompositionTarget.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess() VerifyAccess() VerifyAccess() VerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)


Rendering Rendering Rendering Rendering

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

Applies to