Condividi tramite


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)

Syntax

'Declaration
Public Property Viewport As Viewport
'Usage
Dim instance As Device
Dim value As Viewport

value = instance.Viewport

instance.Viewport = value
public Viewport Viewport { get; set; }
public:
property Viewport Viewport {
    Viewport get ();
    void set (Viewport value);
}
/** @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.

Exceptions

Exception type Condition

InvalidCallException

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

Remarks

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.

Platforms

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.

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

Device Class
Device Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace