Recommended

Skip Navigation LinksHome / Search

Search

 
Results Per Page

Found 4 results for Network Change.
Date between: <not defined> and <not defined>
Search in: News , Articles , Tips , Shows , Showcase , Books

Order by Publish Date   Ascending Title   Rating  

  • 0 comments  /  posted by  Silverlight Show  on  Sep 15, 2009 (9 months ago)
    In this tutorial Allan Muller explains how to detect a network change.

    When building RIAs you often rely on data being downloaded when up front via the preloader which is find for getting the look and feel and some static content but when you need to display specific data which the user has input into often you need to pass data to and from web services or databases. This obviously requires an active internet connection but what happens if the users connection drops? Well in Silverlight 3 the NetworkInformation namespace was introduced which allows you to hook up an event to your application and capture when the connection is alive or dropped. In this tutorial I am going to show you how to hook up this event and also inform the user of the issue on screen.



  • 0 comments  /  posted by  Silverlight Show  on  Sep 09, 2009 (9 months ago)

    In part II of this article Malcolm Sheridan demonstrates how to save data locally using isolated storage and then updates the database using RIA services once you’re back online. If you remember in Part I he showed you how easy it is to detect network changes using Silverlight. 

    Well here is part II. I thought it would be nice to use the networking capabilities of Silverlight to either save changes locally using IsolatedStorage when there is no network connection, and when the network is restored, propagating those changes up to the database using RIA Services. This is a very simple application, but I’m trying to show you what is possible.

  • 0 comments  /  posted by  Silverlight Show  on  Sep 07, 2009 (9 months ago)
    In part one of this article Malcolm Sheridan demonstrates how to use the networking features in Silverlight to detect network changes.

    For business applications today, having a network connection is almost mandatory. In the past I have worked on applications that required data synchronization when the application was re-connected to the network. Silverlight 3 has some new features that will help you detect network changes and how to react to those changes. These features are wrapped up inside the NetworkChange and NetworkInterface classes.

  • 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

    As an example I created the following demo:


    This is a simple tasks list. You can add or delete tasks. The tasks are saved on the server and the application is using WCF Service to connect to the server. Nothing special. But if you save the application for offline use you can use it even if you don't have internet connection. I'm using the isolated storage to keep copy of the data on the client and the application is working with the local copy when there is no connection. It synchronizes automatically whenever the connection comes back.

    Download Source 

     


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)