Customizing the User Interface

In the previous chapter, we learned how to incorporate platform-specific features into the TrackMyWalks application, depending on the mobile platform that is being run, as well as how to incorporate the NuGet package into the shared-core project solution.

You learned how to create a LocationService Interface and Class, which included a number of class instance methods used by our iOS and Android platforms to handle location-based features and obtain current GPS coordinates, as well as handling location updates in the background on the mobile device. You learned how to make relevant changes to both WalkEntryPageViewModel and WalkDistancePageViewModel to allow for location-based features to work, before moving on to creating a CustomMapOverlay class that will be used to display a native Map control, based on the current platform.

Lastly, you updated WalkDistancePage.xaml and the code-behind file to handle location updates so that it will automatically  update the native Map control whenever new location coordinates are obtained.

In this chapter, you'll learn how to customize DataTemplates to lay out your Views beautifully and neatly in your application's user interface by modifying your ContentPages (Views). You will also learn how to create and implement various styles in your XAML pages, prior to getting accustomed to working with the PlatformEffects API to customize the appearance, as well as styling native control elements for each platform.

Finally, you'll learn how to set up your margins and padding for each platform using the OnPlatform XAML tag, before moving on to learning how to manipulate the visual appearance of data-bound fields using ValueConverters and ImageConverters.

This chapter will cover the following points:

  • Customizing the DataTemplate in the WalksMainPage to lay out content neatly
  • Customizing Padding and Margins in your XAML pages
  • Creating and implementing various Xamarin.Forms Styles in your XAML Pages
  • Implementing RoutingEffects to access platform-specific PlatformEffects using C#
  • Implementing PlatformEffects to customize the appearance of control elements using C#
  • Implementing ValueConverters and ImageConverters in your app using C#
  • Updating the BaseViewModel class to include additional properties using C#
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.66.156