private void networkStatusChanged(object sender)
{
var connectionProfile = NetworkInformation.GetInternetConnectionProfile();
var connectionCostType = connectionProfile.GetConnectionCost().NetworkCostType;
if (connectionCostType == NetworkCostType.Unknown || connectionCostType == NetworkCostType.Unrestricted)
IsOnMeteredConnection = false;
else
IsOnMeteredConnection = true;
IsNearingDataLimit = connectionProfile.GetConnectionCost().ApproachingDataLimit || connectionProfile.GetConnectionCost().OverDataLimit || connectionProfile.GetConnectionCost().Roaming;
}