33 Advanced Windows Apps

What’s In This Chapter?

  • App Lifetime
  • Sharing Data
  • Using App Services
  • Creating a Background Task
  • Using the Camera
  • Accessing Geolocation Information
  • Using the MapControl
  • Using Sensors

Wrox.com Code Downloads for This Chapter

The wrox.com code downloads for this chapter are found at http://www.wrox.com/go/professionalcsharp6 on the Download Code tab. The code for this chapter contains one big sample that shows the various aspects of this chapter:

  • AppLifetime Sample
  • Sharing Samples
  • AppServices
  • Camera Sample
  • Map Sample
  • Sensor Sample
  • Rolling Marble

Overview

The previous chapter introduced you to user interface (UI) elements for Universal Windows Platform (UWP) apps. This chapter continues from there to show you several aspects specific to UWP apps. You see how UWP apps have a lifetime management that is different from desktop applications. You use the share contract to create share source and target apps to share data between apps. You make use of different devices and sensors—such as the camera to take pictures and record videos—get location information, and get information about how the user moves the device by using several sensors, such as accelerometer and inclinometer.

Let’s start with the app lifetime of Windows apps, which is very different from the lifetime of desktop applications.

App Lifetime

Windows 8 introduced a new life cycle for apps that is completely different from the life cycle of desktop applications. This changed a little with ...

Get Professional C# 6 and .NET Core 1.0 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.