Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Texture2D.Width Property

Gets the width of this texture resource, in pixels.

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

public int Width { get; }

Property Value

The width of this texture resource, in pixels.

For Windows Phone, the maximum rendertarget texture size is 8 MB; make sure when creating a new texture that the width*height*format <= 8 Mb.

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

© 2015 Microsoft