Skip to main content
NetworkInformation.NetworkStatusChanged | networkstatuschanged event

Applies to Windows and Windows Phone

Occurs when the network status changes for a connection.

Syntax


function onNetworkStatusChanged(eventArgs) { /* Your code */ }
 
// addEventListener syntax
networkInformation.addEventListener("networkstatuschanged", onNetworkStatusChanged);
networkInformation.removeEventListener("networkstatuschanged", onNetworkStatusChanged);
 
- or -

networkInformation.onnetworkstatuschanged = onNetworkStatusChanged;

public static event NetworkStatusChangedEventHandler NetworkStatusChanged

Public Shared Event NetworkStatusChanged As NetworkStatusChangedEventHandler

public:
static event NetworkStatusChangedEventHandler^ NetworkStatusChanged {
   Windows::Foundation::EventRegistrationToken add(NetworkStatusChangedEventHandler^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}

Event information

Delegate NetworkStatusChangedEventHandler

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking.Connectivity
Windows::Networking::Connectivity [C++]

Metadata

Windows.winmd

See also

NetworkInformation