Xamarin.Forms Projects
上QQ阅读APP看书,第一时间看更新

Building a News App Using Xamarin.Forms Shell

In this chapter, we will create a news app that leverages the new Shell navigation functionality provided to us by the Xamarin team at Microsoft. The old way still works—no worries, but we are sure that you will enjoy the new way of defining the structure of your app. Also, you can mix and match old and new as well.

By the end of this chapter, you will have learned how to define an app structure using Shell, consume data from a REST API and configure navigation and passing data between views using query style routes.

So what is Shell, then? In Shell, you define the structure of your app using Extensible Application Markup Language (XAML) instead of hiding it in spread-out pieces of code in your app. You can also navigate using routes, just like those fancy web developers are doing.

The following topics will be covered in this chapter:

  • Defining a Shell navigation page
  • Creating a flyout
  • Creating a navigation bar
  • Navigating using routes and passing data in query strings
  • Consuming data from a public representational state transfer (REST) application programming interface (API)
  • Adding content in the form of a CollectionView control