Device.Viewport Property (Microsoft.DirectX.Direct3D)
Retrieves or sets the viewport parameters for the current device.
Microsoft.DirectX.Direct3D.Viewport
This property is read/write.
A Viewport object that represents the returned viewport parameters or specifies the viewport parameters to set.
Device.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 Device.Viewport and draw a geometry sequence for each view.
Exceptions
InvalidCallException Occurs if Viewport is invalid, or if Viewport describes a region that cannot exist within the render target surface.