Viewport.Width Property

Gets or sets the width dimension of the viewport on the render-target surface, in pixels.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

Syntax

public int Width { get; set; }

Property Value

The width, in pixels, of the viewport to set or get.

Remarks

Unless rendering is being done only to a subset of the surface, this member should be set to the width dimension of the render-target surface.

See Also

Reference

Viewport Structure
Viewport Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP