BackgroundTransferRequest.TransferPreferences Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the preferred conditions under which transfers are enabled.

Namespace: Microsoft.Phone.BackgroundTransfer
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public Property TransferPreferences As TransferPreferences
public TransferPreferences TransferPreferences { get; set; }

Property Value

Type: Microsoft.Phone.BackgroundTransfer..::.TransferPreferences
The preferred conditions under which transfers are enabled.

Remarks

This property allows applications to request that background transfers proceed when only a cellular connection is available and when the device is on battery power. This is only a preference setting. It does not guarantee that transfers will take place under these conditions. The default value is None, which indicates that transfers should occur only when a Wi-Fi connection is available and when the device is connected to external power.

This method may throw one of the following exceptions.

InvalidOperationException

A transfer request’s properties cannot be modified after it has been submitted or disposed.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

BackgroundTransferRequest Class

Microsoft.Phone.BackgroundTransfer Namespace