Recommended

Skip Navigation LinksHome / Tips / Connectivity

Connectivity

+
Items Resolution

  • 6 comments  /  posted by  Nikolay Raychev  on  Mar 19, 2009 (more than a year ago)

    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

    Share



Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)