Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我检查了DeviceNetworkInformationClass并且有一些属性将网络的当前状态返回为TRUEor FALSE:
DeviceNetworkInformation
TRUE
FALSE
IsCellularDataEnabled
IsWiFiEnabled
我想知道是否有允许操作/设置网络状态的 API,比如说打开/关闭无线或打开/关闭数据连接?
您不能直接更改设置,但可以启动ConnectionSettingsTask,这将打开相关的操作系统设置页面。