public string GetSSID()
        {
            string wifi = "Desconocida (UWP)";
            IReadOnlyList <ConnectionProfile> deviceAccountID = null;

            deviceAccountID = NetworkInformation.GetConnectionProfiles();
            if (deviceAccountID.Count != 0)
            {
                try
                {
                    foreach (var conProf in deviceAccountID)
                    {
                        if (conProf.IsWlanConnectionProfile)
                        {
                            WlanConnectionProfileDetails wlanConnectionProfileDetails = conProf.WlanConnectionProfileDetails;
                            if (wlanConnectionProfileDetails.GetConnectedSsid() != "")
                            {
                                wifi = wlanConnectionProfileDetails.GetConnectedSsid();
                                break;
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine("Fallo recuperando informaciĆ³n de la Wifi: " + ex.ToString());
                    throw;
                }
            }
            return(wifi);
        }
        string GetWlanConnectionProfileDetailsInfo(WlanConnectionProfileDetails wlanConnectionProfileDetails)
        {
            string wlanDetails = string.Empty;

            wlanDetails += "Wireless LAN Connection Profile Details:\n";
            wlanDetails += "====================\n";

            if (wlanConnectionProfileDetails == null)
            {
                wlanDetails += "Wireless LAN connection profile details unavailable.\n";
                return(wlanDetails);
            }

            wlanDetails += "Connected SSID: " + wlanConnectionProfileDetails.GetConnectedSsid() + "\n";
            return(wlanDetails);
        }