VirtualSurfaceImageSource VirtualSurfaceImageSource VirtualSurfaceImageSource Class

Extends SurfaceImageSource to support scenarios when the content is potentially larger than what can fit on screen and the content must be virtualized to render optimally.

Syntax

Declaration

public sealed class VirtualSurfaceImageSourcepublic sealed class VirtualSurfaceImageSourcePublic NotInheritable Class VirtualSurfaceImageSource

Inheritance Hierarchy

Remarks

This class has additional API, but those API are for Microsoft DirectX interoperation and are not part of the general app programming model otherwise described in this documentation. For example, from the Microsoft DirectX side, you can call BeginDraw. For more info on how to draw to a VirtualSurfaceImageSource, including sample code, see DirectX and XAML interop.

Constructors summary

Initializes a new instance of the VirtualSurfaceImageSource class, specifying the size of the drawing area.

Initializes a new instance of the VirtualSurfaceImageSource class, specifying the size of the drawing area and a preference for whether to render with an alpha transparency.

Constructors

  • VirtualSurfaceImageSource(System.Int32,System.Int32)
    VirtualSurfaceImageSource(System.Int32,System.Int32)
    VirtualSurfaceImageSource(System.Int32,System.Int32)
    VirtualSurfaceImageSource(System.Int32,System.Int32)

    Initializes a new instance of the VirtualSurfaceImageSource class, specifying the size of the drawing area.

    public VirtualSurfaceImageSource(System.Int32,System.Int32)public VirtualSurfaceImageSource(System.Int32,System.Int32)Public Function VirtualSurfaceImageSource(System.Int32,System.Int32) As

    Parameters

    • pixelWidth
      System.Int32
      System.Int32
      System.Int32

      Width of the drawing area in pixels.

    • pixelHeight
      System.Int32
      System.Int32
      System.Int32

      Height of the drawing area in pixels.

    Remarks

    Windows 8 behavior

    Windows 8 validates that pixelWidth and pixelHeight are under 100 million (100,000,000). Starting with Windows 8.1 the validation limit is 17 million (17,000,000) in each dimension. > [!NOTE]

    Other factors might impact how much content can be rendered in a single VirtualSurfaceImageSource. For example, placing a VirtualSurfaceImageSource in a ScrollViewer might further reduce the effective size based on the ScrollViewer 's limits.

  • VirtualSurfaceImageSource(System.Int32,System.Int32,System.Boolean)
    VirtualSurfaceImageSource(System.Int32,System.Int32,System.Boolean)
    VirtualSurfaceImageSource(System.Int32,System.Int32,System.Boolean)
    VirtualSurfaceImageSource(System.Int32,System.Int32,System.Boolean)

    Initializes a new instance of the VirtualSurfaceImageSource class, specifying the size of the drawing area and a preference for whether to render with an alpha transparency.

    public VirtualSurfaceImageSource(System.Int32,System.Int32,System.Boolean)public VirtualSurfaceImageSource(System.Int32,System.Int32,System.Boolean)Public Function VirtualSurfaceImageSource(System.Int32,System.Int32,System.Boolean) As

    Parameters

    • pixelWidth
      System.Int32
      System.Int32
      System.Int32

      Width of the drawing area in pixels.

    • pixelHeight
      System.Int32
      System.Int32
      System.Int32

      Height of the drawing area in pixels.

    • isOpaque
      System.Boolean
      System.Boolean
      System.Boolean

      true if the area should render opaque. false to render with possible alpha transparency.

    Remarks

    Windows 8 behavior

    Windows 8 validates that pixelWidth and pixelHeight are under 100 million (100,000,000). Starting with Windows 8.1 the validation limit is 17 million (17,000,000) in each dimension. > [!NOTE]

    Other factors might impact how much content can be rendered in a single VirtualSurfaceImageSource. For example, placing a VirtualSurfaceImageSource in a ScrollViewer might further reduce the effective size based on the ScrollViewer 's limits.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Media.Imaging.dll