ConnectionCost ConnectionCost ConnectionCost ConnectionCost Class

Definition

Provides access to property values that indicate the current cost of a network connection.

public sealed class ConnectionCostpublic sealed class ConnectionCostPublic NotInheritable Class ConnectionCostpublic sealed class ConnectionCost
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For more information on using cost data to manage connectivity, see Quickstart: Managing metered network cost constraints.

On Windows Phone 8.1 the Roaming property indicates roaming for international roaming only.

Properties

ApproachingDataLimit ApproachingDataLimit ApproachingDataLimit ApproachingDataLimit

Gets a value that indicates if a connection is approaching the data usage allowance specified by the data plan.

public bool ApproachingDataLimit { get; }public bool ApproachingDataLimit { get; }Public ReadOnly Property ApproachingDataLimit As boolpublic bool ApproachingDataLimit { get; }
Value
bool bool bool bool

TRUE if the connection profile is close to the data limit threshold; otherwise, FALSE.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

BackgroundDataUsageRestricted BackgroundDataUsageRestricted BackgroundDataUsageRestricted BackgroundDataUsageRestricted

Gets a value that indicates whether background data usage has been restricted.

public bool BackgroundDataUsageRestricted { get; }public bool BackgroundDataUsageRestricted { get; }Public ReadOnly Property BackgroundDataUsageRestricted As boolpublic bool BackgroundDataUsageRestricted { get; }
Value
bool bool bool bool

True if background data usage is restricted.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

NetworkCostType NetworkCostType NetworkCostType NetworkCostType

Gets a value that indicates the current network cost for a connection.

public NetworkCostType NetworkCostType { get; }public NetworkCostType NetworkCostType { get; }Public ReadOnly Property NetworkCostType As NetworkCostTypepublic NetworkCostType NetworkCostType { get; }
Value
NetworkCostType NetworkCostType NetworkCostType NetworkCostType

The network cost of the connection.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

OverDataLimit OverDataLimit OverDataLimit OverDataLimit

Gets a value that indicates if the connection has exceeded the data usage allowance specified by the data plan.

public bool OverDataLimit { get; }public bool OverDataLimit { get; }Public ReadOnly Property OverDataLimit As boolpublic bool OverDataLimit { get; }
Value
bool bool bool bool

TRUE if the current total data usage is over the specified data limit; otherwise, FALSE.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

For Windows Phone Store app, when the device is in the OverDataLimit state, network connectivity is disabled for background tasks.

Roaming Roaming Roaming Roaming

Gets a value that indicates whether the connection is connected to a network outside of the home provider.

public bool Roaming { get; }public bool Roaming { get; }Public ReadOnly Property Roaming As boolpublic bool Roaming { get; }
Value
bool bool bool bool

TRUE if the connection on a roaming network; otherwise, FALSE.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

On Windows Phone 8.1, the Roaming property indicates roaming for international roaming only.