Windows.Threading.Dispatcher' does not contain a definition for 'RunAsync' and no extension method 'RunAsync' accepting a first argument of type

Posted by suhail mehdi on Programmers See other posts from Programmers or by suhail mehdi
Published on 2014-05-30T08:50:06Z Indexed on 2014/05/30 9:36 UTC
Read the original article Hit count: 388

Filed under:

public MainPage()

{

InitializeComponent(); offline.Visibility = (Network.IsConnected ? Visibility.Collapsed : Visibility.Visible);

       Network.InternetConnectionChanged += async (s, e) =>
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                offline.Visibility =
                    (e.IsConnected ? Visibility.Collapsed : Visibility.Visible);
            });
        };



    }

© Programmers or respective owner

Related posts about windows-phone-8