PictureCollection.Item Property

Gets the Picture at the specified index in the PictureCollection.

Syntax

'Declaration
Public ReadOnly Property Item ( _
         index As Integer _
) As Picture 
public Picture this [
         int index
] { get; }
public:
property Picture default [Int32] {
         Picture get (int index);
}

Property Value

Type: Picture
A new Picture representing the picture at the specified index in this PictureCollection.

Remarks

Each call returns a new Picture instance.

Picture resources such as the picture texture and thumbnail are cached in each Picture instance. Retrieving and maintaining references to multiple instances of the same picture, and then accessing the picture texture or thumbnail on each of those instances, creates multiple copies of the texture or thumbnail.

Requirements

Namespace: Microsoft.Xna.Framework.Media

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

See Also

Reference

PictureCollection Class
PictureCollection Members
Microsoft.Xna.Framework.Media Namespace

Platforms

Windows Phone