DirectComposition samples


For apps on Windows 10, we recommend using Windows.UI.Composition APIs instead of DirectComposition. For more info, see Modernize your desktop app using the Visual layer.

The following sample applications show how to use the Microsoft DirectComposition API and demonstrate its capabilities.

In this section

Topic Description
DirectComposition layered child window sample
Demonstrates how to use DirectComposition to animate the bitmap of a layered child window.
Managing DirectCompositi?on Animation with Windows Animation Manager v2
Demonstrates how Windows Animation Manager v2 can be used to generate animation curves (functions) that can be consumed by DirectComposition? to create animated transitions in a desktop application.
Demonstrates how to use DirectComposition to apply animations and effects to visuals that have Direct2D bitmap content.
DirectComposition Backface Visibility and D2D Batching
Demonstrates how to use the DirectComposition API to apply backface visibility to a visual element to show and hide the back side of a DirectComposition visual. This sample also demonstrates a performance optimization of batching D2D BeginDraw/EndDraw calls.