Connection Info
Through the static NetworkInformation
class, you can discover details about all current network connections. You can also be notified of any changes via its NetworkStatusChanged
property. For example, NetworkInformation
’s GetConnectionProfiles
method returns a collection of ConnectionProfile
s, which have methods that expose the cost of the connection (including whether the user is roaming or over the data limit) and how much of the connection is used. You can use information like this to warn a user who is about to download a large file through your app while on a costly network. However, for some scenarios in which you already have StorageFile
(s), checking IsAvailable
is much simpler than manually examining the current connection ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.