Compositor Compositor Compositor Compositor Class
Definition
Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prerelease APIs are identified by a Prerelease label.
[Contains prerelease APIs.]
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.
public : sealed class Compositor : IClosable, ICompositor, ICompositor2, ICompositor3, ICompositor4public sealed class Compositor : IDisposable, ICompositor, ICompositor2, ICompositor3, ICompositor4Public NotInheritable Class Compositor Implements IDisposable, ICompositor, ICompositor2, ICompositor3, ICompositor4// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
The Compositor implicitly synchronizes changes made to associated visuals to ensure they get applied in a transactional manner.
See the Composition UI Overview and Composition Visual Tree Overview for more information.
New instances of Compositor must be created on a thread that has a CoreDispatcher.
Constructors
Compositor() Compositor() Compositor() Compositor()
Creates an instance of Compositor.
public : Compositor()public Compositor()Public Sub New()// This API is not available in Javascript.
Methods
Close() Close() Close() Close()
Closes the Compositor object and releases system resources.
public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// This API is not available in Javascript.
CreateAmbientLight() CreateAmbientLight() CreateAmbientLight() CreateAmbientLight()
Creates an instance of AmbientLight.
public : AmbientLight CreateAmbientLight()public AmbientLight CreateAmbientLight()Public Function CreateAmbientLight() As AmbientLight// This API is not available in Javascript.
Returns the created AmbientLight object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
- See Also
CreateAnimationGroup() CreateAnimationGroup() CreateAnimationGroup() CreateAnimationGroup()
Creates an instance of CompositionAnimationGroup.
public : CompositionAnimationGroup CreateAnimationGroup()public CompositionAnimationGroup CreateAnimationGroup()Public Function CreateAnimationGroup() As CompositionAnimationGroup// This API is not available in Javascript.
Returns the created CompositionAnimationGroup object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
CreateBackdropBrush() CreateBackdropBrush() CreateBackdropBrush() CreateBackdropBrush()
Creates an instance of CompositionBackdropBrush.
public : CompositionBackdropBrush CreateBackdropBrush()public CompositionBackdropBrush CreateBackdropBrush()Public Function CreateBackdropBrush() As CompositionBackdropBrush// This API is not available in Javascript.
Returns the created CompositionBackdropBrush object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Examples
// Create an effect description
GaussianBlurEffect blurEffect = new GaussianBlurEffect()
{
Name = "Blur",
BlurAmount = 1.0f,
BorderMode = EffectBorderMode.Hard,
Optimization = EffectOptimization.Balanced
};
blurEffect.Source = new CompositionEffectSourceParameter("source");
CompositionEffectFactory blurEffectFactory = _compositor.CreateEffectFactory(blurEffect);
CompositionEffectBrush blurBrush = blurEffectFactory.CreateBrush();
// Create a BackdropBrush and bind it to the EffectSourceParameter “source”
CompositionBackdropBrush backdropBrush = _compositor.CreateBackdropBrush();
blurBrush.SetSourceParameter("source", backdropBrush);
Remarks
See the remarks section of CompositionEffectBrush for information on creating and using effects.
CreateColorBrush() CreateColorBrush() CreateColorBrush() CreateColorBrush()
Creates an instance of CompositionColorBrush.
public : CompositionColorBrush CreateColorBrush()public CompositionColorBrush CreateColorBrush()Public Function CreateColorBrush() As CompositionColorBrush// This API is not available in Javascript.
Returns the created CompositionColorBrush object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
- See Also
CreateColorBrush(Color) CreateColorBrush(Color) CreateColorBrush(Color) CreateColorBrush(Color)
Creates an instance of CompositionColorBrush using the specified color.
public : CompositionColorBrush CreateColorBrush(Color color)public CompositionColorBrush CreateColorBrush(Color color)Public Function CreateColorBrush(color As Color) As CompositionColorBrush// This API is not available in Javascript.
Returns the created CompositionColorBrush object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
- See Also
CreateColorGradientStop() CreateColorGradientStop() CreateColorGradientStop() CreateColorGradientStop()
Prerelease. Creates an instance of CompositionColorGradientStop.
public : CompositionColorGradientStop CreateColorGradientStop()public CompositionColorGradientStop CreateColorGradientStop()Public Function CreateColorGradientStop() As CompositionColorGradientStop// This API is not available in Javascript.
The created CompositionColorGradientStop object.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
CreateColorGradientStop(Single, Color) CreateColorGradientStop(Single, Color) CreateColorGradientStop(Single, Color) CreateColorGradientStop(Single, Color)
Prerelease. Creates an instance of CompositionColorGradientStop with the specified offset and color.
public : CompositionColorGradientStop CreateColorGradientStop(float offset, Color color)public CompositionColorGradientStop CreateColorGradientStop(Single offset, Color color)Public Function CreateColorGradientStop(offset As Single, color As Color) As CompositionColorGradientStop// This API is not available in Javascript.
- offset
- float Single Single Single
The location of the gradient stop within the gradient vector.
The created CompositionColorGradientStop object.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
CreateColorKeyFrameAnimation() CreateColorKeyFrameAnimation() CreateColorKeyFrameAnimation() CreateColorKeyFrameAnimation()
Creates an instance of ColorKeyFrameAnimation.
public : ColorKeyFrameAnimation CreateColorKeyFrameAnimation()public ColorKeyFrameAnimation CreateColorKeyFrameAnimation()Public Function CreateColorKeyFrameAnimation() As ColorKeyFrameAnimation// This API is not available in Javascript.
Returns the created ColorKeyFrameAnimation object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
CreateContainerVisual() CreateContainerVisual() CreateContainerVisual() CreateContainerVisual()
Creates an instance of ContainerVisual.
public : ContainerVisual CreateContainerVisual()public ContainerVisual CreateContainerVisual()Public Function CreateContainerVisual() As ContainerVisual// This API is not available in Javascript.
Returns the created ContainerVisual object.
Examples
//
// Set up Windows.UI.Composition Compositor, root ContainerVisual, and associate with
// the CoreWindow.
//
_compositor = new Compositor();
_root = _compositor.CreateContainerVisual();
_view.CompositionRootVisual = _root;
//
// Create a simple scene.
//
var child = _compositor.CreateSpriteVisual();
child.Brush = _compositor.CreateColorBrush(Color.FromArgb(0xFF, 0x00, 0xCC, 0x00));
child.Offset = new Vector2(50.0f, 50.0f);
child.Size = new Vector2(200, 200);
_root.Children.InsertAtTop(child);
ref class MyClass
{
Compositor ^ _compositor;
CompositionTarget ^ _target;
ContainerVisual ^ _root;
void Initialize()
{
//
// Set up Composition.
//
_compositor = ref new Compositor();
_target = _compositor->CreateTargetForCurrentView();
_root = _compositor->CreateContainerVisual();
_target->Root = _root;
//
// Create a simple scene.
//
auto child = _compositor->CreateSpriteVisual();
child->Brush = _compositor.CreateColorBrush(ColorHelper::FromArgb(0xFF, 0x00, 0xCC, 0x00));
child->Offset = float2(50.0f, 50.0f);
child->Size = float2(200, 200);
_root->Children->InsertAtTop(child);
}
}
CreateCubicBezierEasingFunction(Vector2, Vector2) CreateCubicBezierEasingFunction(Vector2, Vector2) CreateCubicBezierEasingFunction(Vector2, Vector2) CreateCubicBezierEasingFunction(Vector2, Vector2)
Creates an instance of CubicBezierEasingFunction.
public : CubicBezierEasingFunction CreateCubicBezierEasingFunction(Vector2 controlPoint1, Vector2 controlPoint2)public CubicBezierEasingFunction CreateCubicBezierEasingFunction(Vector2 controlPoint1, Vector2 controlPoint2)Public Function CreateCubicBezierEasingFunction(controlPoint1 As Vector2, controlPoint2 As Vector2) As CubicBezierEasingFunction// This API is not available in Javascript.
- controlPoint1
- Vector2 Vector2 Vector2 Vector2
The first control point for the easing function.
- controlPoint2
- Vector2 Vector2 Vector2 Vector2
The second control point for the easing function.
CreateDistantLight() CreateDistantLight() CreateDistantLight() CreateDistantLight()
Creates an instance of DistantLight.
public : DistantLight CreateDistantLight()public DistantLight CreateDistantLight()Public Function CreateDistantLight() As DistantLight// This API is not available in Javascript.
Returns the created DistantLight object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
- See Also
CreateDropShadow() CreateDropShadow() CreateDropShadow() CreateDropShadow()
Creates an instance of DropShadow.
public : DropShadow CreateDropShadow()public DropShadow CreateDropShadow()Public Function CreateDropShadow() As DropShadow// This API is not available in Javascript.
Returns the created DropShadow object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect)
Creates an instance of CompositionEffectFactory.
public : CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect)public CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect)Public Function CreateEffectFactory(graphicsEffect As IGraphicsEffect) As CompositionEffectFactory// This API is not available in Javascript.
- graphicsEffect
- IGraphicsEffect IGraphicsEffect IGraphicsEffect IGraphicsEffect
The type of effect to create.
Returns the created CompositionEffectFactory object.
Remarks
Creating an effect factory compiles an effect and allows instances of that effect to be created.
See the remarks section of CompositionEffectBrush for information on creating and using effects.
Currently supported effects types are:
| Effect Name | Description |
|---|---|
| ArithmeticCompositeEffect | Combines two images using a weighted sum of pixels from the source images. |
| CompositeEffect | Combines two or more images based on their alpha channel. This effect has 13 different composite modes. The composite effect accepts 2 or more inputs. When you specify 2 images, destination is the first input (index 0) and the source is the second input (index 1). If you specify more than 2 inputs the images are composited starting with the first input and the second and so on. |
| BlendEffect (21 of 26 modes) | Combines 2 images. This effect has 26 blend modes with 21 of the modes currently supported by the Compositon API. The 5 blend modes that are currently not implemented are dissolve, hue, saturation, color, and luminosity. |
| ColorSourceEffect | The color source effect generates a specified solid color. It is useful as a source to other effects, such as tinting an image using a blend with a color source. |
| SaturationEffect | Alters the saturation of an image. If you set it to 1 the output image is fully saturated. If you set it to 0 the output image is monochrome. |
| Transform2DEffect | The 2D affine transform effect applies a spatial transform to an image based on a 3X2 matrix. This effect can be used to rotate, scale, skew, or translate an image. Or, you can combine these operations. Affine transfers preserve parallel lines and the ratio of distances between any three points in an image. |
See the Win2D namespace, Microsoft.Graphics.Canvas.Effects, for more information on the effect types.
- See Also
CreateEffectFactory(IGraphicsEffect, IIterable)
CreateEffectFactory(IGraphicsEffect, IIterable)
CreateEffectFactory(IGraphicsEffect, IIterable)
CreateEffectFactory(IGraphicsEffect, IIterable)
Creates an instance of CompositionEffectFactory specifying effect parameters that should be animatable.
public : CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect, IIterable<PlatForm::String> animatableProperties)public CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect, IEnumerable<String> animatableProperties)Public Function CreateEffectFactory(graphicsEffect As IGraphicsEffect, animatableProperties As IEnumerable<String>) As CompositionEffectFactory// This API is not available in Javascript.
- graphicsEffect
- IGraphicsEffect IGraphicsEffect IGraphicsEffect IGraphicsEffect
The type of effect to create.
- animatableProperties
- IIterable<PlatForm::String> IEnumerable<String> IEnumerable<String> IEnumerable<String>
The list of properties that should be animatable. Properties are specified using strings of the form 'EffectName.PropertyName', where 'EffectName' identifies a graphics effect object by its IGraphicsEffect.Name property and 'PropertyName' identifies a property of that object.
Returns the created CompositionEffectFactory object.
- See Also
CreateExpressionAnimation() CreateExpressionAnimation() CreateExpressionAnimation() CreateExpressionAnimation()
Creates an instance of ExpressionAnimation.
public : ExpressionAnimation CreateExpressionAnimation()public ExpressionAnimation CreateExpressionAnimation()Public Function CreateExpressionAnimation() As ExpressionAnimation// This API is not available in Javascript.
Returns the created ExpressionAnimation object.
- See Also
CreateExpressionAnimation(String) CreateExpressionAnimation(String) CreateExpressionAnimation(String) CreateExpressionAnimation(String)
Creates an instance of ExpressionAnimation.
public : ExpressionAnimation CreateExpressionAnimation(PlatForm::String expression)public ExpressionAnimation CreateExpressionAnimation(String expression)Public Function CreateExpressionAnimation(expression As String) As ExpressionAnimation// This API is not available in Javascript.
- expression
- PlatForm::String String String String
The expression describing how the ExpressionAnimation should calculate its current value.
Returns the created ExpressionAnimation object.
- See Also
CreateHostBackdropBrush() CreateHostBackdropBrush() CreateHostBackdropBrush() CreateHostBackdropBrush()
Creates an instance of CompositionBackdropBrush that samples from the area behind the visual, before the window is drawn.
public : CompositionBackdropBrush CreateHostBackdropBrush()public CompositionBackdropBrush CreateHostBackdropBrush()Public Function CreateHostBackdropBrush() As CompositionBackdropBrush// This API is not available in Javascript.
Returns the created CompositionBackdropBrush.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Remarks
The standard backdrop brush samples the area immediately behind the visual where it is used.� The host backdrop brush tells the compositor to sample from the area behind the visual, before the window is drawn.� The host backdrop brush is translucent and it hit-tests as opaque. The app cannot read the pixel data back.
CreateImplicitAnimationCollection() CreateImplicitAnimationCollection() CreateImplicitAnimationCollection() CreateImplicitAnimationCollection()
Creates an instance of ImplicitAnimationCollection.
public : ImplicitAnimationCollection CreateImplicitAnimationCollection()public ImplicitAnimationCollection CreateImplicitAnimationCollection()Public Function CreateImplicitAnimationCollection() As ImplicitAnimationCollection// This API is not available in Javascript.
Returns the created ImplicitAnimationCollection object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Examples
class PropertyAnimation
{
PropertyAnimation(Compositor compositor, SpriteVisual heroVisual, SpriteVisual listVisual)
{
// Define ImplicitAnimationCollection
ImplicitAnimationCollection implicitAnimations = compositor.CreateImplicitAnimationCollection();
// Trigger animation when the “Offset” property changes.
implicitAnimations["Offset"] = CreateAnimation(compositor);
// Assign ImplicitAnimations to a visual. Unlike Visual.Children,
// ImplicitAnimations can be shared by multiple visuals so that they
// share the same implicit animation behavior (same as Visual.Clip).
heroVisual.ImplicitAnimations = implicitAnimations;
// ImplicitAnimations can be shared among visuals
listVisual.ImplicitAnimations = implicitAnimations;
listVisual.Offset = new Vector3(20f, 20f, 20f);
}
Vector3KeyFrameAnimation CreateAnimation(Compositor compositor)
{
Vector3KeyFrameAnimation animation = compositor.CreateVector3KeyFrameAnimation();
animation.InsertExpressionKeyFrame(0f, "this.StartingValue");
animation.InsertExpressionKeyFrame(1f, "this.FinalValue");
animation.Target = “Offset”;
animation.Duration = TimeSpan.FromSeconds(0.25);
return animation;
}
}
CreateInsetClip() CreateInsetClip() CreateInsetClip() CreateInsetClip()
Creates an instance of InsetClip.
public : InsetClip CreateInsetClip()public InsetClip CreateInsetClip()Public Function CreateInsetClip() As InsetClip// This API is not available in Javascript.
- See Also
CreateInsetClip(Single, Single, Single, Single) CreateInsetClip(Single, Single, Single, Single) CreateInsetClip(Single, Single, Single, Single) CreateInsetClip(Single, Single, Single, Single)
Creates an instance of InsetClip.
public : InsetClip CreateInsetClip(float leftInset, float topInset, float rightInset, float bottomInset)public InsetClip CreateInsetClip(Single leftInset, Single topInset, Single rightInset, Single bottomInset)Public Function CreateInsetClip(leftInset As Single, topInset As Single, rightInset As Single, bottomInset As Single) As InsetClip// This API is not available in Javascript.
- leftInset
- float Single Single Single
Inset from the left of the visual.
- topInset
- float Single Single Single
Inset from the top of the visual.
- rightInset
- float Single Single Single
Inset from the right of the visual.
- bottomInset
- float Single Single Single
Inset from the bottom of the visual.
- See Also
CreateLayerVisual() CreateLayerVisual() CreateLayerVisual() CreateLayerVisual()
Creates an instance of LayerVisual.
public : LayerVisual CreateLayerVisual()public LayerVisual CreateLayerVisual()Public Function CreateLayerVisual() As LayerVisual// This API is not available in Javascript.
Returns the created LayerVisual object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
CreateLinearEasingFunction() CreateLinearEasingFunction() CreateLinearEasingFunction() CreateLinearEasingFunction()
Creates an instance of LinearEasingFunction.
public : LinearEasingFunction CreateLinearEasingFunction()public LinearEasingFunction CreateLinearEasingFunction()Public Function CreateLinearEasingFunction() As LinearEasingFunction// This API is not available in Javascript.
Returns the created LinearEasingFunction object.
CreateLinearGradientBrush() CreateLinearGradientBrush() CreateLinearGradientBrush() CreateLinearGradientBrush()
Prerelease. Creates an instance of CompositionLinearGradientBrush.
public : CompositionLinearGradientBrush CreateLinearGradientBrush()public CompositionLinearGradientBrush CreateLinearGradientBrush()Public Function CreateLinearGradientBrush() As CompositionLinearGradientBrush// This API is not available in Javascript.
The created CompositionLinearGradientBrush object.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
CreateMaskBrush() CreateMaskBrush() CreateMaskBrush() CreateMaskBrush()
Creates an instance of CompositionMaskBrush.
public : CompositionMaskBrush CreateMaskBrush()public CompositionMaskBrush CreateMaskBrush()Public Function CreateMaskBrush() As CompositionMaskBrush// This API is not available in Javascript.
Returns the created CompositionMaskBrush object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
CreateNineGridBrush() CreateNineGridBrush() CreateNineGridBrush() CreateNineGridBrush()
Creates an instance of CompositionNineGridBrush.
public : CompositionNineGridBrush CreateNineGridBrush()public CompositionNineGridBrush CreateNineGridBrush()Public Function CreateNineGridBrush() As CompositionNineGridBrush// This API is not available in Javascript.
Returns the created CompositionNineGridBrush object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
CreatePointLight() CreatePointLight() CreatePointLight() CreatePointLight()
Creates an instance of PointLight.
public : PointLight CreatePointLight()public PointLight CreatePointLight()Public Function CreatePointLight() As PointLight// This API is not available in Javascript.
Returns the created PointLight object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
- See Also
CreatePropertySet() CreatePropertySet() CreatePropertySet() CreatePropertySet()
Creates an instance of CompositionPropertySet.
public : CompositionPropertySet CreatePropertySet()public CompositionPropertySet CreatePropertySet()Public Function CreatePropertySet() As CompositionPropertySet// This API is not available in Javascript.
Returns the created CompositionPropertySet object.
CreateQuaternionKeyFrameAnimation() CreateQuaternionKeyFrameAnimation() CreateQuaternionKeyFrameAnimation() CreateQuaternionKeyFrameAnimation()
Creates an instance of QuaternionKeyFrameAnimation.
public : QuaternionKeyFrameAnimation CreateQuaternionKeyFrameAnimation()public QuaternionKeyFrameAnimation CreateQuaternionKeyFrameAnimation()Public Function CreateQuaternionKeyFrameAnimation() As QuaternionKeyFrameAnimation// This API is not available in Javascript.
Returns the created QuaternionKeyFrameAnimation object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
CreateScalarKeyFrameAnimation() CreateScalarKeyFrameAnimation() CreateScalarKeyFrameAnimation() CreateScalarKeyFrameAnimation()
Creates an instance of ScalarKeyFrameAnimation.
public : ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation()public ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation()Public Function CreateScalarKeyFrameAnimation() As ScalarKeyFrameAnimation// This API is not available in Javascript.
Returns the created ScalarKeyFrameAnimation object.
CreateScopedBatch(CompositionBatchTypes) CreateScopedBatch(CompositionBatchTypes) CreateScopedBatch(CompositionBatchTypes) CreateScopedBatch(CompositionBatchTypes)
Creates an instance of CompositionScopedBatch.
public : CompositionScopedBatch CreateScopedBatch(CompositionBatchTypes batchType)public CompositionScopedBatch CreateScopedBatch(CompositionBatchTypes batchType)Public Function CreateScopedBatch(batchType As CompositionBatchTypes) As CompositionScopedBatch// This API is not available in Javascript.
The type of composition batch to create.
Returns the created CompositionScopedBatch object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
CreateSpotLight() CreateSpotLight() CreateSpotLight() CreateSpotLight()
Creates an instance of SpotLight.
public : SpotLight CreateSpotLight()public SpotLight CreateSpotLight()Public Function CreateSpotLight() As SpotLight// This API is not available in Javascript.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
- See Also
CreateSpringScalarAnimation() CreateSpringScalarAnimation() CreateSpringScalarAnimation() CreateSpringScalarAnimation()
Prerelease. Creates an instance of SpringScalarNaturalMotionAnimation.
public : SpringScalarNaturalMotionAnimation CreateSpringScalarAnimation()public SpringScalarNaturalMotionAnimation CreateSpringScalarAnimation()Public Function CreateSpringScalarAnimation() As SpringScalarNaturalMotionAnimation// This API is not available in Javascript.
The created SpringScalarNaturalMotionAnimation object.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
CreateSpringVector2Animation() CreateSpringVector2Animation() CreateSpringVector2Animation() CreateSpringVector2Animation()
Prerelease. Creates an instance of SpringVector2NaturalMotionAnimation.
public : SpringVector2NaturalMotionAnimation CreateSpringVector2Animation()public SpringVector2NaturalMotionAnimation CreateSpringVector2Animation()Public Function CreateSpringVector2Animation() As SpringVector2NaturalMotionAnimation// This API is not available in Javascript.
The created SpringVector2NaturalMotionAnimation object.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
CreateSpringVector3Animation() CreateSpringVector3Animation() CreateSpringVector3Animation() CreateSpringVector3Animation()
Prerelease. Creates an instance of SpringVector3NaturalMotionAnimation.
public : SpringVector3NaturalMotionAnimation CreateSpringVector3Animation()public SpringVector3NaturalMotionAnimation CreateSpringVector3Animation()Public Function CreateSpringVector3Animation() As SpringVector3NaturalMotionAnimation// This API is not available in Javascript.
The created SpringVector3NaturalMotionAnimation object.
| Device family |
Windows 10 Insider Preview (introduced v10.0.16257.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v5)
|
CreateSpriteVisual() CreateSpriteVisual() CreateSpriteVisual() CreateSpriteVisual()
Creates an instance of SpriteVisual.
public : SpriteVisual CreateSpriteVisual()public SpriteVisual CreateSpriteVisual()Public Function CreateSpriteVisual() As SpriteVisual// This API is not available in Javascript.
Returns the created SpriteVisual object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
CreateStepEasingFunction() CreateStepEasingFunction() CreateStepEasingFunction() CreateStepEasingFunction()
Creates an instance of StepEasingFunction.
public : StepEasingFunction CreateStepEasingFunction()public StepEasingFunction CreateStepEasingFunction()Public Function CreateStepEasingFunction() As StepEasingFunction// This API is not available in Javascript.
Returns the created StepEasingFunction object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Examples
StepsEasing(Compositor compositor, SpriteVisual heroVisual)
{
// This step function makes the property offset change in 5 steps
// i.e. goes from (0,0,0) à (20,20,20) in 5 steps.
StepEasingFunction steps = compositor.CreateStepEasingFunction();
steps.StepCount = 5;
Vector3KeyFrameAnimation animation = compositor.CreateVector3KeyFrameAnimation();
animation.InsertKeyFrame(0f, new Vector3(0f,0f,0f));
animation.InsertKeyFrame(1f, new Vector3(20f,20f,0f), steps);
animation.Duration = TimeSpan.FromSeconds(2);
// Run animation for 4 times
animation.IterationCount = 4;
heroVisual.StartAnimation("Offset", animation);
}
- See Also
CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32)
Creates an instance of StepEasingFunction with the specified step count.
public : StepEasingFunction CreateStepEasingFunction(int stepCount)public StepEasingFunction CreateStepEasingFunction(Int32 stepCount)Public Function CreateStepEasingFunction(stepCount As Int32) As StepEasingFunction// This API is not available in Javascript.
- stepCount
- int Int32 Int32 Int32
The step count for the StepEasingFunction.
Returns the created StepEasingFunction object.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
- See Also
CreateSurfaceBrush() CreateSurfaceBrush() CreateSurfaceBrush() CreateSurfaceBrush()
Creates an instance of CompositionSurfaceBrush.
public : CompositionSurfaceBrush CreateSurfaceBrush()public CompositionSurfaceBrush CreateSurfaceBrush()Public Function CreateSurfaceBrush() As CompositionSurfaceBrush// This API is not available in Javascript.
Returns the created CompositionSurfaceBrush object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Examples
SpriteVisual visual= compositor.CreateSpriteVisual();
var surface = graphicsDevice.CreateDrawingSurface(new Size(300, 50),
Windows.Graphics.DirectX.DirectXPixelFormat.B8G8R8A8UIntNormalized,
CompositionAlphaMode.Ignore);
var surfaceBrush = _compositor.CreateSurfaceBrush(surface);
surfaceBrush.HorizontalAlignmentRatio = 0.0;
surfaceBrush.VerticalAlignmentRatio= 0.0;
surfaceBrush.Stretch = CompositionStretch.None;
visual.Brush = surfaceBrush;
- See Also
CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface) CreateSurfaceBrush(ICompositionSurface)
Creates an instance of CompositionSurfaceBrush using the specified composition surface.
public : CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface surface)public CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface surface)Public Function CreateSurfaceBrush(surface As ICompositionSurface) As CompositionSurfaceBrush// This API is not available in Javascript.
The composition surface to associate with the CompositionSurfaceBrush.
Returns the created CompositionSurfaceBrush object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
- See Also
CreateTargetForCurrentView() CreateTargetForCurrentView() CreateTargetForCurrentView() CreateTargetForCurrentView()
Creates a CompositionTarget for the current view.
public : CompositionTarget CreateTargetForCurrentView()public CompositionTarget CreateTargetForCurrentView()Public Function CreateTargetForCurrentView() As CompositionTarget// This API is not available in Javascript.
Returns the created CompositionTarget object.
CreateVector2KeyFrameAnimation() CreateVector2KeyFrameAnimation() CreateVector2KeyFrameAnimation() CreateVector2KeyFrameAnimation()
Creates an instance of Vector2KeyFrameAnimation.
public : Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation()public Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation()Public Function CreateVector2KeyFrameAnimation() As Vector2KeyFrameAnimation// This API is not available in Javascript.
Returns the created Vector2KeyFrameAnimation object.
CreateVector3KeyFrameAnimation() CreateVector3KeyFrameAnimation() CreateVector3KeyFrameAnimation() CreateVector3KeyFrameAnimation()
Creates an instance of Vector3KeyFrameAnimation.
public : Vector3KeyFrameAnimation CreateVector3KeyFrameAnimation()public Vector3KeyFrameAnimation CreateVector3KeyFrameAnimation()Public Function CreateVector3KeyFrameAnimation() As Vector3KeyFrameAnimation// This API is not available in Javascript.
Returns the created Vector3KeyFrameAnimation object.
CreateVector4KeyFrameAnimation() CreateVector4KeyFrameAnimation() CreateVector4KeyFrameAnimation() CreateVector4KeyFrameAnimation()
Creates an instance of Vector4KeyFrameAnimation.
public : Vector4KeyFrameAnimation CreateVector4KeyFrameAnimation()public Vector4KeyFrameAnimation CreateVector4KeyFrameAnimation()Public Function CreateVector4KeyFrameAnimation() As Vector4KeyFrameAnimation// This API is not available in Javascript.
Returns the created Vector4KeyFrameAnimation object.
Dispose() Dispose() Dispose() Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()
GetCommitBatch(CompositionBatchTypes) GetCommitBatch(CompositionBatchTypes) GetCommitBatch(CompositionBatchTypes) GetCommitBatch(CompositionBatchTypes)
Retrieves a commit batch for the current commit cycle.
public : CompositionCommitBatch GetCommitBatch(CompositionBatchTypes batchType)public CompositionCommitBatch GetCommitBatch(CompositionBatchTypes batchType)Public Function GetCommitBatch(batchType As CompositionBatchTypes) As CompositionCommitBatch// This API is not available in Javascript.
The batch type.
Returns a CompositionCommitBatch representing the retrieved commit batch.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|