Delen via


Windows.UI.Composition Namespace

Provides APIs for user interface composition.

Classes

AmbientLight

A light that illuminates every targeted Visual equally .

AnimationController

Provides playback controls for a KeyFrameAnimation.

AnimationEndedEventArgs

Provides event data for the CompositionPropertyAnimator.AnimationEnded event.

AnimationPropertyInfo

Represents information about a property that can be animated.

BackEasingFunction

Represents an easing function that changes a value in the opposite direction of the main function during part of a duration, then reverses and finishes the function-over-time behavior in a conventional way.

BooleanKeyFrameAnimation

A time-based animation that targets a Boolean property with one or more key frames.

BounceEasingFunction

Represents an easing function that creates an animated bouncing effect.

BounceScalarNaturalMotionAnimation

A bounce physics-based animation that targets any Scalar-based property.

BounceVector2NaturalMotionAnimation

A bounce physics-based animation that targets any Vector2-based property.

BounceVector3NaturalMotionAnimation

A bounce physics-based animation that targets any Vector3-based property.

CircleEasingFunction

Represents an easing function that creates an animation that accelerates and/or decelerates using a circular function.

ColorKeyFrameAnimation

A time-based animation that targets the Color property with one or more color key frames.

The ColorKeyFrameAnimation class is one of the supported types of KeyFrameAnimations that is used to animate the Color property off of the Brush property on a SpriteVisual. When working with ColorKeyFrameAnimation s, utilize Windows.UI.Color objects for the values of keyframes. Utilize the InterpolationColorSpace property to define which color space the system will interpolate through for the animation.

CompositionAnimation

Represents the base animation class.

CompositionAnimationGroup

Defines a group of animations.

CompositionAnimationGroup provides a way to group CompositionAnimations in a list which will be started at the same time when StartAnimationGroup is called on CompositionObject. All CompositionAnimation in CompositionAnimationGroup need to assign a value to the Target property in the animation itself. CompositionAnimationGroup can also be associated with ImplicitAnimationCollection as an animation that gets executed as a result of a trigger.

CompositionBackdropBrush

A brush that applies an effect (or a chain of effects) to the region behind a SpriteVisual.

CompositionBatchCompletedEventArgs

Arguments for the CompositionCommitBatch.Completed or CompositionScopedBatch.Completed events.

CompositionBrush

Base class for brushes used to paint a SpriteVisual.

CompositionCapabilities

Provides the ability to check system hardware capabilities so that Visual Layer Effects may be scaled accordingly. This allows you to ensure that your application's use of rendering-intensive operations is tailored to match the device's capabilities, providing optimum performance and pleasant visual results.

CompositionClip

Base class for clipping objects such as InsetClip.

CompositionColorBrush

Paints a SpriteVisual with a solid color.

CompositionColorGradientStop

Describes the location and color of a transition point in a gradient.

CompositionColorGradientStopCollection

Represents a collection of CompositionColorGradientStop objects that can be individually accessed by index.

CompositionCommitBatch

A group of active animations or effects.

CompositionContainerShape

Represents a container for CompositionShapes, used to group items that share 2D transforms.

CompositionDrawingSurface

A drawing surface for interoperation with Direct2D or Direct3D.

CompositionEasingFunction

Base class for interpolator functions to use with KeyFrameAnimations.

The CompositionEasingFunction class is the base class for easing functions that are used with KeyFrameAnimation s. Easing functions are used to describe how the system interpolates between two different keyframes. For a list of supported easing functions, see the types in the Derived section.

CompositionEffect

Represents an effect.

CompositionEffectBrush

Paints a SpriteVisual with the output of a filter effect. The filter effect description is defined using the CompositionEffectFactory class.

CompositionEffectFactory

Creates a composition object that contains a Win2D effect description format in the Microsoft.Graphics.Canvas.Effects namespace.

Note

Effects that are not supported are marked as [NoComposition] in the Win2D API Reference for effects namespace.

CompositionEffectFactoryLoadResult

Represents information about the results of a call to the status of a call to CompositionEffectFactory.CompleteLoadAsync.

CompositionEffectSourceParameter

Used to declare an arbitrary name (a String) to be associated with a CompositionBrush (the “effect source”). The association of the given name and the effect source occurs when the SetSourceParameter method of a CompositionEffectBrush is called.

CompositionEllipseGeometry

Represents an ellipse with the specified center and radius.

CompositionGeometricClip

Represents a shape that clips a portion of a visual. The visible portion of the visual is a shape defined by a CompositionGeometry. The portion of the visual outside the geometry is clipped.

CompositionGeometry

Represents the base class for composition geometries.

CompositionGradientBrush

Represents a brush that describes a gradient, composed of gradient stops.

CompositionGradientBrush is supported only with Rgb and RgbLinear CompositionColorSpace.

CompositionGraphicsDevice

Used to create all hardware bound resources for a given DirectX device on a compositor session. CompositionGraphicsDevice contains a DirectX device that is used to perform the GPU operations. Developers can obtain a Graphics device from the compositor top level object.

CompositionImage

Represents an image.

CompositionImageLoadResult

Represents the result of loading a CompositionImage.

CompositionImageOptions

Represents options for a CompositionImage.

CompositionLight

Base class for a light source that can target a UI scene.

The CompositionLight.Targets property determines which Visuals are lit.

CompositionLinearGradientBrush

Represents a brush that paints an area with a linear gradient.

CompositionLineGeometry

Represents a straight line between two points.

CompositionMaskBrush

Paints a SpriteVisual with a CompositionBrush with an opacity mask applied to it. The source of the opacity mask can be any CompositionBrush of type CompositionColorBrush, CompositionLinearGradientBrush, CompositionSurfaceBrush, CompositionEffectBrush or a CompositionNineGridBrush. The opacity mask must be specified as a CompositionSurfaceBrush.

CompositionMipmapSurface

Represents a drawing surface for mipmap textures.

CompositionNineGridBrush

Paints a SpriteVisual with a CompositionBrush after applying Nine-Grid Stretching to the contents of the Source brush. The source of the nine-grid stretch can by any CompositionBrush of type CompositionColorBrush, CompositionSurfaceBrush or a CompositionEffectBrush.

CompositionObject

Base class of the composition API representing a node in the visual tree structure.

Composition objects are the visual tree structure on which all other features of the composition API use and build on. The API allows developers to define and create one or many Visual objects each representing a single node in a Visual tree.

CompositionPath

Represents a series of connected lines and curves.

CompositionPathGeometry

Represents a series of connected lines and curves.

CompositionProjectedShadow

Represents a scene-based shadow calculated using the relationship between the light, the visual that casts the shadow,and the visual that receives the shadow, such that the shadow is drawn differently on each receiver.

CompositionProjectedShadowCaster

Represents an object that casts a projected shadow.

CompositionProjectedShadowCasterCollection

Represents a collection of CompositionProjectedShadowCaster objects.

CompositionProjectedShadowReceiver

Represents an object that can have a projected shadow cast on it.

CompositionProjectedShadowReceiverUnorderedCollection

Represents an unordered collection of CompositionProjectedShadowReceiver objects.

CompositionPropertyAnimator

Animates composition properties.

CompositionPropertySet

Stores values as key-value pairs.

CompositionRadialGradientBrush

Represents a brush that paints an area with a radial gradient.

CompositionRectangleGeometry

Warning

This API contains a known issue in Windows 10, versions 2004 and below. Don't use this API in your code.

Represents a rectangle shape of the specified size. To obtain a CompositionRectangleGeometry instance, call Compositor.CreateRectangleGeometry.

CompositionRoundedRectangleGeometry

Represents a rectangle shape of the specified size with rounded corners.

CompositionScopedBatch

An explicitly created group of active animations or effects.

CompositionShadow

Base class for shadows that can be applied to a SpriteVisual.

CompositionShape

Represents the base shape class.

CompositionShapeCollection

Represents a collection of CompositionShape objects that can be individually accessed by index.

CompositionSpriteShape

A CompositionShape that draws Stroked and Filled CompositionGeometry.

CompositionStrokeDashArray

Represents a collection of values that indicates the pattern of dashes and gaps that is used to outline shapes.

CompositionSurfaceBrush

Paints a SpriteVisual with pixels from an ICompositionSurface.

CompositionTarget

Represents the window on which to display the composition tree.

CompositionTexture

Represents a raw Direct3D texture that can be bound to a composition visual as content. The object can be used anywhere that a generic composition surface can be used in those APIs today—for example, as the content of a sprite visual or a surface brush. The object exposes an available fence, which can be used to synchronize application rendering and composition work. Can also accept various attributes, such as an alpha mode, source rect, and color space, to more precisely define the content being displayed.

The composition textures API supports Direct3D 11 only.

CompositionTransform

Provides generalized transformation support for composition objects.

CompositionViewBox

Represents a container that maps shape visual tree coordinates onto the visual.

CompositionVirtualDrawingSurface

Represents sparsely allocated bitmaps that can be associated with visuals for composition in a visual tree.

CompositionVisualSurface

Represents a visual tree as an ICompositionSurface that can be used to paint a Visual using a CompositionBrush.

Compositor

Manages the session between an application and the system compositor process.

The Compositor class creates an instance of the Compositor for the application that can be used as a factory for a variety of types in the Windows.UI.Composition namespace spanning the visual layer, effects system and animation system. The Compositor class also manages the lifetime of objects created from the factory.

ContainerVisual

A node in the visual tree that can have children.

CubicBezierEasingFunction

Represents a cubic-bezier function for interpolating between animation key frames.

DelegatedInkTrailVisual

Represents a "wet" ink stroke rendered by the system while the application processes the "dry" ink rendering pass.

DistantLight

An infinitely large distant light source that emits light in a single direction. For example, a distant light could be used to represent sunlight.

DropShadow

A drop shadow cast by a SpriteVisual or LayerVisual.

EffectVisual

Represents a visual tree node that is the root of a CompositionEffect.

ElasticEasingFunction

Represents an easing function that creates an animation that resembles a spring oscillating back and forth until it comes to rest.

ExponentialEasingFunction

Represents an easing function that creates an animation that accelerates and/or decelerates using an exponential formula.

ExpressionAnimation

A Composition Animation that uses a mathematical equation to calculate the value for an animating property every frame.

ImageVisual

Represents a visual tree node that is the root of a CompositionImage.

ImplicitAnimationCollection

A collection of animations triggered when a condition is met.

InitialValueExpressionCollection

A collection of values that specify where an animation will start.

InsetClip

Represents a rectangle that clips a portion of a visual. The portion of the visual inside the rectangle is visible; the portion of the visual outside the rectangle is clipped.

KeyFrameAnimation

A time-based animation with one or more key frames. These frames are markers, allowing developers to specify values at specific times for the animating property. KeyFrame animations can be further customized by specifying how the animation interpolates between keyframes.

LayerVisual

A ContainerVisual whose children are flattened into a single layer.

LinearEasingFunction

Represents a linear function for interpolating between animation key frames.

NaturalMotionAnimation

Represents a physics-based animation that uses forces to dynamically move content.

PathKeyFrameAnimation

Warning

This API contains a known issue in Windows 10, versions 20H2 and below. Do not use this API in your code.

Represents a time-based animation with one or more key frames where each key frame value is represented by a CompositionPath. The easing specifies the interopolation between paths.

PointLight

A point source of light that emanates light in all directions.

PowerEasingFunction

Represents an easing function that creates an animation that accelerates and/or decelerates using the formula f (t) = t*p* where p is equal to the Power property.

QuaternionKeyFrameAnimation

A time-based animation that targets the Orientation property with one or more key frames.

The QuaternionKeyFrameAnimation class is one of the supported types of KeyFrameAnimations that is used to animate the Orientation property on a Visual. Quaternions are a useful and sometimes simpler way to think about rotations – Quaternions take the shortest path between angles and avoid issues like Gimbal Lock that rotation angle/axis and rotation matrices run into. A Quaternion is made up of two components: a scalar and vector part.

RectangleClip

Represents a rectangle with optional rounded corners that clips a portion of a visual. The portion of the visual inside the rectangle is visible; the portion of the visual outside the rectangle is clipped.

RedirectVisual

Represents a visual that gets its content from another visual.

RenderingDeviceReplacedEventArgs

Arguments for the RenderingDeviceReplaced event.

ScalarKeyFrameAnimation

A time-based animation that targets any Scalar-based property with one or more key frames.

ScalarNaturalMotionAnimation

The base Scalar NaturalMotionAnimation used to target a Scalar property.

ShapeVisual

Represents a visual tree node that is the root of a CompositionShape.

SineEasingFunction

Represents an easing function that creates an animation that accelerates and/or decelerates using a sine formula.

SolidColorVisual

Represents a solid color.

SpotLight

A light source that casts inner and outer cones of light. For example, a flashlight.

SpringScalarNaturalMotionAnimation

A spring physics-based animation that targets any Scalar-based property.

SpringVector2NaturalMotionAnimation

A spring physics-based animation that targets any Vector2-based property.

SpringVector3NaturalMotionAnimation

A spring physics-based animation that targets any Vector3-based property.

SpriteVisual

Hosts 2D boxed content of type CompositionBrush. Any part of the visual not covered by pixels from the brush are rendered as transparent pixels. CompositionBrush can be either a CompositionBackdropBrush, CompositionColorBrush, a CompositionSurfaceBrush or a CompositionEffectBrush.

StepEasingFunction

A step function for interpolating between animation key frames that advances animations in increments like steps which can be can be defined. Behaviors for initial and final steps can be customized.

Vector2KeyFrameAnimation

A time-based animation that targets any Vector2-based property with one or more key frames.

Vector2NaturalMotionAnimation

The base Vector2 NaturalMotionAnimation used to target a Vector2 property.

Vector3KeyFrameAnimation

A time-based animation that targets any Vector3-based property with one or more keyframes.

Vector3NaturalMotionAnimation

The base Vector3 NaturalMotionAnimation used to target a Vector3 property.

Vector4KeyFrameAnimation

A time-based animation that targets any Vector4-based property with one or more keyframes.

Visual

The base visual object in the visual hierarchy.

VisualCollection

Represents a collection of visual instances.

VisualUnorderedCollection

An unordered collection of visuals.

Structs

InkTrailPoint

Represents a single point for a DelegatedInkTrailVisual.

Interfaces

IAnimationObject

Represents an object that has properties that can be referenced by an animation.

ICompositionAnimationBase

Base class for composition animations.

ICompositionSupportsSystemBackdrop

Provides a property for working with a CompositionBrush as a system backdrop. A SpriteVisual with the given CompositionBrush will be placed at the back of the implementing object's subtree.

ICompositionSurface

Represents the content of a surface that can be used to paint the bounds of a SpriteVisual.

ICompositionSurfaceFacade

Represents a placeholder for a composition surface that can be used like a real composition surface.

IVisualElement

Marks an object to indicate to the system that it can resolve to a composition Visual.

IVisualElement2

Provides a method that retrieves an object's underlying Visual.

Enums

AnimationControllerProgressBehavior

Defines constants that specify how the AnimationController.Progress value is determined.

AnimationDelayBehavior

Specifies the animation delay behavior.

AnimationDirection

Specifies the play direction of an animation.

AnimationEndReason

Defines constants that specify why an animation ended.

AnimationIterationBehavior

Specifies if the animation should loop.

AnimationPropertyAccessMode

Defines constants that specify how an animated property can be accessed.

AnimationStopBehavior

Specifies the behavior of an animation when it stops.

CompositionBackfaceVisibility

Specifies whether the back face of a visual is visible during a 3D transform.

CompositionBatchTypes

Batch types for CompositionCommitBatch and CompositionScopedBatch.

CompositionBitmapInterpolationMode

Specifies the algorithm used for interpolating pixels from ICompositionSurface when they do not form a one-to-one mapping to pixels on screen.

CompositionBorderMode

Controls the aliasing behavior on the edges of visual borders.

CompositionColorSpace

Specifies the color space for interpolating color values in ColorKeyFrameAnimation.

CompositionCompositeMode

Determines how a non-opaque visual's content is blended with the background content behind the visual.

CompositionDropShadowSourcePolicy

Specifies the masking policy for a shadow.

CompositionEasingFunctionMode

Defines constants that specify how the animation associated with an easing function interpolates.

CompositionEffectFactoryLoadStatus

The status of the asynchronous compilation of a shader for an effect description.

CompositionGetValueStatus

Indicates the outcome of an attempt to retrieve the value of a key-value pair.

CompositionGradientExtendMode

Defines constants that specify how to draw the gradient outside the brush's gradient vector or space.

CompositionImageLoadStatus

Defines constants that specify the status of a call to CompositionImage.CompleteLoadAsync.

CompositionImageProgressStage

Defines constants that specify the progress of loading a CompositionImage.

CompositionMappingMode

Defines constants that specify whether the gradient brush's positioning coordinates (StartPoint, EndPoint) are absolute or relative to the output area.

CompositionStretch

Specifies how content is scaled when mapped from its source to a destination space.

CompositionStrokeCap

Defines constants that specify the shape at the end of a line or segment.

CompositionStrokeLineJoin

Defines constants that specify the shape used to join two lines or segments.

Remarks

Windows.UI.Composition Overviews, Samples, and Known Issues

Item Description
Windows.UI.Composition Overview Overview and architecture of the API
Windows.UI.Composition Samples API samples in the official Github
Known Issues and Latest Information Latest updates on the API in the MSDN Forums

See also