Windows 8 Development - XAML OnLaunched / NetworkInformation Class

Опубликовано: 02 Ноябрь 2024
на канале: techytube
379
2

Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By mzmuda@techytube, for more from this author visit:
http://www.techytube.com/author/mzmuda

Now that we've added our resource for the feed data, we need to override the OnLaunched method in App.xaml.

Since our application also needs to check for an internet connection, we will make use of the NetworkInformation class.

This class presents a standardized way to check for an active internet connection rather than an arbitrary DNS query, or other methods of checking for connection.

OnLaunched is called when the application is launched, and it is in this method that we'll perform our internet check, as well as start pulling down feeds.

In this video, I will show you how to override the OnLaunched method with application specific logic, and how to use the NetworkInformation class.

References

XAML Blog Reader - http://msdn.microsoft.com/en-us/libra...