Device.Viewport Property

Gets or sets the viewport parameters for the current device.

Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)

public Viewport Viewport { get; set; }
/** @property */
public Viewport get_Viewport ()

/** @property */
public void set_Viewport (Viewport value)

public function get Viewport () : Viewport

public function set Viewport (value : Viewport)

Not applicable.

Property Value

A Viewport structure that represents the returned viewport parameters or specifies the viewport parameters to set.

Exception typeCondition


ViewPort is invalid, or ViewPort describes a region that cannot exist within the render target surface.

Viewport can be used to draw on part of the screen. It should be set before any geometry is drawn so the ViewPort will take effect.

To draw multiple views within a scene, repeat setting Viewport and draw a geometry sequence for each view.

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Compact Framework

Supported in: 2.0

Community Additions