1 public static bool IsWifiConnected()
 2 {
 3     bool isWifiConnected = false;
 4     ConnectionProfile currentConnectionForInternet = NetworkInformation.GetInternetConnectionProfile();
 5     if(currentConnectionForInternet == null)
 6     {
 7         return false;
 8     }
 9     if(currentConnectionForInternet.IsWlanConnectionProfile)
10     {
11         if(currentConnectionForInternet.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess)
12         {
13             return true;
14         }
15     }
16     return false;
17 }

Windows 8.1 和 Windows Phone 8.1 Runtime 检测 WiFi 是否可用使用以上方法。(感觉比WP8 silverlight 麻烦-_-)

相关文章:

  • 2021-11-10
  • 2022-12-23
  • 2021-12-09
  • 2022-01-18
  • 2021-05-17
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
猜你喜欢
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2022-01-19
相关资源
相似解决方案