CompositionVirtualDrawingSurface Class

Definition

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

public ref class CompositionVirtualDrawingSurface : CompositionDrawingSurface
/// [Windows.Foundation.Metadata.Composable(Microsoft.UI.Composition.ICompositionVirtualDrawingSurfaceFactory, Windows.Foundation.Metadata.CompositionType.Public, 65536, "Microsoft.Foundation.LiftedContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.LiftedContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class CompositionVirtualDrawingSurface : CompositionDrawingSurface
[Windows.Foundation.Metadata.Composable(typeof(Microsoft.UI.Composition.ICompositionVirtualDrawingSurfaceFactory), Windows.Foundation.Metadata.CompositionType.Public, 65536, "Microsoft.Foundation.LiftedContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public class CompositionVirtualDrawingSurface : CompositionDrawingSurface
Public Class CompositionVirtualDrawingSurface
Inherits CompositionDrawingSurface
Inheritance
CompositionVirtualDrawingSurface
Attributes
Windows.Foundation.Metadata.ComposableAttribute Windows.Foundation.Metadata.ContractVersionAttribute Windows.Foundation.Metadata.MarshalingBehaviorAttribute Windows.Foundation.Metadata.ThreadingAttribute Windows.Foundation.Metadata.WebHostHiddenAttribute

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.

(Inherited from CompositionDrawingSurface)
Comment

A string to associate with the CompositionObject.

(Inherited from CompositionObject)
Compositor

The Compositor used to create this CompositionObject.

(Inherited from CompositionObject)
DispatcherQueue

Gets the DispatcherQueue for the CompostionObject.

(Inherited from CompositionObject)
ImplicitAnimations

The collection of implicit animations attached to this object.

(Inherited from CompositionObject)
PixelFormat

The pixel format of the drawing surface.

(Inherited from CompositionDrawingSurface)
Properties

The collection of properties associated with the CompositionObject.

(Inherited from CompositionObject)
Size

The size of the drawing surface.

(Inherited from CompositionDrawingSurface)
SizeInt32

The size of the drawing surface.

(Inherited from CompositionDrawingSurface)

Methods

Close()

Closes the CompositionObject and releases system resources.

(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.

(Inherited from CompositionObject)
Resize(SizeInt32)

Resizes the drawing surface to the specified size.

(Inherited from CompositionDrawingSurface)
Scroll(PointInt32)

Scrolls the drawing surface.

(Inherited from CompositionDrawingSurface)
Scroll(PointInt32, RectInt32)

Scrolls the drawing surface.

(Inherited from CompositionDrawingSurface)
ScrollWithClip(PointInt32, RectInt32)

Scrolls the drawing surface using the specified clip rectangle.

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

Scrolls the drawing surface with the specified clip rectangle.

(Inherited from CompositionDrawingSurface)
StartAnimation(String, CompositionAnimation)

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

(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.

(Inherited from CompositionObject)
StopAnimation(String)

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

(Inherited from CompositionObject)
StopAnimationGroup(ICompositionAnimationBase)

Stops an animation group.

(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.

TryGetAnimationController(String)

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

(Inherited from CompositionObject)

Applies to