![Turn off wifi calling t-mobile Turn off wifi calling t-mobile](https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/26/83/3286.WlanPostPic1.png)
Dec 10, 2015 I need to turn off the WiFi a while after pressing the 'Turn off the Screen' button. There is a need for this app for my tablet because sometimes I just forget to turn off the WiFi and this discharges the battery very fast. Dec 06, 2015 1 Answer 1. Active oldest votes. Up vote 1 down vote. First of all you need to request access to be able to modify the radio with WiFiAdapter.RequestAccessAsync, furthermore you get the radios with Radio.GetRadiosAsync and check the one with Kind as WiFi, finally you disable it with SetStateAsync(RadioState.Off).
Is there a way to turn off Wi-Fi on Windows 10 via C# as if I pressed that button in Internet access menu (or Action Center) as in the link below?
Forgot to say. I am writing a WPF application. Will these methods work on it? I've tried them, but it seems like I don't have a reference for some library.
Eugene Garbuzov
Eugene GarbuzovEugene Garbuzov
1 Answer
First of all you need to request access to be able to modify the radio with WiFiAdapter.RequestAccessAsync(), furthermore you get the radios with Radio.GetRadiosAsync() and check the one with Kind as WiFi, finally you disable it with SetStateAsync(RadioState.Off).
AleFranzAleFranz75111 gold badge77 silver badges1313 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.