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)
Property Value
A Viewport structure that represents the returned viewport parameters or specifies the viewport parameters to set.
Exceptions
Exception type | Condition |
---|---|
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Device Class
Device Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace