NetworkInformation.NetworkStatusChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the network status changes for a connection.
public:
static event NetworkStatusChangedEventHandler ^ NetworkStatusChanged;
// Register
static event_token NetworkStatusChanged(NetworkStatusChangedEventHandler const& handler) const;
// Revoke with event_token
static void NetworkStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
static NetworkInformation::NetworkStatusChanged_revoker NetworkStatusChanged(auto_revoke_t, NetworkStatusChangedEventHandler const& handler) const;
public static event NetworkStatusChangedEventHandler NetworkStatusChanged;
function onNetworkStatusChanged(eventArgs) { /* Your code */ }
Windows.Networking.Connectivity.NetworkInformation.addEventListener("networkstatuschanged", onNetworkStatusChanged);
Windows.Networking.Connectivity.NetworkInformation.removeEventListener("networkstatuschanged", onNetworkStatusChanged);
- or -
Windows.Networking.Connectivity.NetworkInformation.onnetworkstatuschanged = onNetworkStatusChanged;
Public Shared Custom Event NetworkStatusChanged As NetworkStatusChangedEventHandler
Event Type
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for