Share via


StorageDevice.BeginShowStorageDeviceGuide Method (AsyncCallback, Object)

Asynchronously displays the device selection UI to allow users to select a device to save data. This method has no effect on Windows.

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

Syntax

public static IAsyncResult BeginShowStorageDeviceGuide (
         AsyncCallback callback,
         Object stateObject
)

Parameters

  • callback
    The method to be called once the user has selected the device.
  • stateObject
    A user-created object that uniquely identifies this request.

Return Value

An IAsyncResult used to track the progress of the method.

Exceptions

Exception type Condition
InvalidOperationException The storage selection user interface could not be shown. This may occur if the user interface is already being shown.
StorageDeviceNotConnectedException The storage device bound to the container is not connected.

Remarks

Calling BeginShowStorageDeviceGuide when another storage device guide is on screen results in an InvalidOperationException. It is possible to trigger this exception if you call BeginShowStorageDeviceGuide immediately after calling EndShowStorageDeviceGuide (when the dialog is still dismissing itself). To avoid this exception, avoid calling BeginShowStorageDeviceGuide twice, or do not call BeginShowStorageDeviceGuide until a few seconds after calling EndShowStorageDeviceGuide.

See Also

Tasks

How to: Get a StorageDevice Asynchronously

Reference

StorageDevice Class
StorageDevice Members
Microsoft.Xna.Framework.Storage Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista