CompositionVirtualDrawingSurface Class

Definition

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

Equivalent WinUI class: Microsoft.UI.Composition.CompositionVirtualDrawingSurface.

public ref class CompositionVirtualDrawingSurface : CompositionDrawingSurface
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CompositionVirtualDrawingSurface : CompositionDrawingSurface
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class CompositionVirtualDrawingSurface : CompositionDrawingSurface
Public Class CompositionVirtualDrawingSurface
Inherits CompositionDrawingSurface
Inheritance
CompositionVirtualDrawingSurface
Attributes

Windows 10 requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

The virtual drawing surface is designed for use in scenarios where an application needs to define a large amount of content but only expects a small portion of content to be visible to a user at a given time. For example, think of a long scrolling document or webpage. In such cases, the app only needs to draw the part of the surface that is currently visible to the user, and can defer drawing portions that are not visible until later when they become visible.

The maximum size of a virtual surface is 2^24(16M) pixels. This limit has been imposed because of floating point precision limits, that come into play beyond that size, which prevents guaranteed accurate pixel alignment of drawn patches.

Properties

AlphaMode

The alpha mode of the drawing surface.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionDrawingSurface.AlphaMode.

(Inherited from CompositionDrawingSurface)
Comment

A string to associate with the CompositionObject.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionObject.Comment.

(Inherited from CompositionObject)
Compositor

The Compositor used to create this CompositionObject.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionObject.Compositor.

(Inherited from CompositionObject)
Dispatcher

The dispatcher for the CompositionObject.

(Inherited from CompositionObject)
DispatcherQueue

Gets the DispatcherQueue for the CompostionObject.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionObject.DispatcherQueue.

(Inherited from CompositionObject)
ImplicitAnimations

The collection of implicit animations attached to this object.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionObject.ImplicitAnimations.

(Inherited from CompositionObject)
PixelFormat

The pixel format of the drawing surface.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionDrawingSurface.PixelFormat.

(Inherited from CompositionDrawingSurface)
Properties

The collection of properties associated with the CompositionObject.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionObject.Properties.

(Inherited from CompositionObject)
Size

The size of the drawing surface.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionDrawingSurface.Size.

(Inherited from CompositionDrawingSurface)
SizeInt32

The size of the drawing surface.

Equivalent WinUI property: Microsoft.UI.Composition.CompositionDrawingSurface.SizeInt32.

(Inherited from CompositionDrawingSurface)

Methods

Close()

Closes the CompositionObject and releases system resources.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionObject.Close.

(Inherited from CompositionObject)
ConnectAnimation(String, CompositionAnimation)

Connects and animation.

(Inherited from CompositionObject)
DisconnectAnimation(String)

Disconnects an animation.

(Inherited from CompositionObject)
Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from CompositionObject)
PopulatePropertyInfo(String, AnimationPropertyInfo)

Defines a property that can be animated.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionObject.PopulatePropertyInfo.

(Inherited from CompositionObject)
Resize(SizeInt32)

Resizes the drawing surface to the specified size.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionDrawingSurface.Resize.

(Inherited from CompositionDrawingSurface)
Scroll(PointInt32)

Scrolls the drawing surface.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionDrawingSurface.Scroll.

(Inherited from CompositionDrawingSurface)
Scroll(PointInt32, RectInt32)

Scrolls the drawing surface.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionDrawingSurface.Scroll.

(Inherited from CompositionDrawingSurface)
ScrollWithClip(PointInt32, RectInt32)

Scrolls the drawing surface using the specified clip rectangle.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionDrawingSurface.ScrollWithClip.

(Inherited from CompositionDrawingSurface)
ScrollWithClip(PointInt32, RectInt32, RectInt32)

Scrolls the drawing surface with the specified clip rectangle.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionDrawingSurface.ScrollWithClip.

(Inherited from CompositionDrawingSurface)
StartAnimation(String, CompositionAnimation)

Connects an animation with the specified property of the object and starts the animation.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionObject.StartAnimation.

(Inherited from CompositionObject)
StartAnimationGroup(ICompositionAnimationBase)

Starts an animation group.

The StartAnimationGroup method on CompositionObject lets you start CompositionAnimationGroup. All the animations in the group will be started at the same time on the object.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionObject.StartAnimationGroup.

(Inherited from CompositionObject)
StopAnimation(String)

Disconnects an animation from the specified property and stops the animation.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionObject.StopAnimation.

(Inherited from CompositionObject)
StopAnimationGroup(ICompositionAnimationBase)

Stops an animation group.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionObject.StopAnimationGroup.

(Inherited from CompositionObject)
Trim(RectInt32[])

Clears portions of a virtual drawing surface that were previously defined. Areas that are cleared will be treated as empty once again, and video memory that was previously backing them will be reclaimed.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionVirtualDrawingSurface.Trim.

TryGetAnimationController(String)

Returns an AnimationController for the animation running on the specified property.

Equivalent WinUI method: Microsoft.UI.Composition.CompositionObject.TryGetAnimationController.

(Inherited from CompositionObject)

Applies to