
using Windows.Networking.Connectivity;
using Windows.UI.Popups;
namespace ControlExplorer.Controls.Maps
{
    public static class MapsHelper
    {
        public static void CheckConnection()
        {
            var internetProfile = NetworkInformation.GetInternetConnectionProfile();

            if (internetProfile == null || internetProfile.GetNetworkConnectivityLevel() != NetworkConnectivityLevel.InternetAccess)
            {
                var dialog = new MessageDialog("There is not network available. Please enable it in order to see this sample.");
                dialog.ShowAsync();
            }
        }
    }
}
