In Silverlight 3 you are able to check if an internet connection is present. You can also detect network changes.
See also:
Silverlight 3 as a Desktop Application (Out-of-Browser Applications)
Network availability checking:
| if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) |
| { |
| this.InitTasks(); |
| } |
Network change detection:
| NetworkChange.NetworkAddressChanged += new |
| NetworkAddressChangedEventHandler(NetworkChangedCallback); |
| private void NetworkChangedCallback(object sender, EventArgs e) |
| { |
| if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) |
| { |
| this.InitTasks(); |
| } |
| } |
Demo