Connection​Cost Connection​Cost Connection​Cost Connection​Cost Class

Definition

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

public : sealed class ConnectionCost : IConnectionCost, IConnectionCost2public sealed class ConnectionCost : IConnectionCost, IConnectionCost2Public NotInheritable Class ConnectionCost Implements IConnectionCost, IConnectionCost2// You can use this class in JavaScript.
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 : PlatForm::Boolean ApproachingDataLimit { get; }public bool ApproachingDataLimit { get; }Public ReadOnly Property ApproachingDataLimit As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

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

BackgroundDataUsageRestricted BackgroundDataUsageRestricted BackgroundDataUsageRestricted BackgroundDataUsageRestricted

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

public : PlatForm::Boolean BackgroundDataUsageRestricted { get; }public bool BackgroundDataUsageRestricted { get; }Public ReadOnly Property BackgroundDataUsageRestricted As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True if background data usage is restricted.

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 NetworkCostType// You can use this property in JavaScript.
Value
NetworkCostType NetworkCostType NetworkCostType NetworkCostType

The network cost of the connection.

See Also

OverDataLimit OverDataLimit OverDataLimit OverDataLimit

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

public : PlatForm::Boolean OverDataLimit { get; }public bool OverDataLimit { get; }Public ReadOnly Property OverDataLimit As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

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

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 : PlatForm::Boolean Roaming { get; }public bool Roaming { get; }Public ReadOnly Property Roaming As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

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

Remarks

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

See Also