O'Reilly logo

Professional C# 5.0 and .NET 4.5.1 by Morgan Skinner, Jay Glynn, Christian Nagel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 39Windows Store Apps: Contracts and Devices

WHAT’S IN THIS CHAPTER?

  • Searching
  • Sharing
  • Camera
  • Geolocation
  • Sensors

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

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

  • Menu Card
  • Camera Sample
  • Geolocation Sample
  • Sensor Sample
  • Rolling Marble

OVERVIEW

The previous chapter introduced you to UI elements for Windows Store apps, and used the API of the Windows Runtime to read and write data. This chapter continues from there to add search features, allows integration of different apps by using share contracts, and makes use of many different devices such as the camera to take pictures and record videos, get the location information from the user, and get information about how the user moves the device by using several sensors such as accelerometer and inclinometer.

Let’s start with searching that changed a lot between Windows 8 and Windows 8.1.

SEARCHING

With Windows 8, search for Windows Store apps was usually done with the Search contract. Searching in apps was started by opening the Charms bar. The issue with that was users had a hard finding out if the app supports searching. Windows 8.1 changed this in that apps that support searching time use a new SearchBox control on the UI.

The sample app from the previous chapter, Menu Card, is extended with search functionality. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required