Reader small image

You're reading from  Cross-platform UI Development with Xamarin.Forms

Product typeBook
Published inAug 2015
Reading LevelBeginner
Publisher
ISBN-139781784391195
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Paul Johnson
Paul Johnson
author image
Paul Johnson

Paul Johnson has been writing software since the early 1980s on machines ranging from the ZX81 and servers to his trusty Mac, and has used more languages than he can remember. He is a qualified scuba diver and college lecturer. Paul lives with his wife, kids, and pets, and listens to an inordinate amount of rock and metal on Primordial Radio. This is his third book for Packt.
Read more about Paul Johnson

Right arrow

Chapter 3. Making It Look Pretty and Logging In

While Xamarin.Forms provides the basics of a user interface experience, it provides just that—a very basic user interface, functional but plain. With a bit of effort though, it is possible to produce custom UI components across the various mobile platforms.

In this chapter we shall:

  • Understand how Xamarin Forms performs the UI tasks

  • Look at the customization of the user interface using a custom renderer

  • Apply these changes to allow for an improved user login experience

Introducing the standard UI login experience


Held within the source code examples in this chapter, you will find a simple Xamarin.Forms application called BasicUI. All the code for this section is taken from there. It is very minimal. When executed, you will see the following:

The iOS and Android UIs

While these are purely functional, they don't exactly look nice. The problem is that we can't change the look and feel very easily. This is due to the technology behind Xamarin Forms.

Abstract this, abstract that

If you think of any user interface, you will find a lot of commonality, as given in the following table:

UI element

Android name

iOS name

Label
Editable text
Image
Table
View

Dropdown
Lists

TextView
EditView
ImageView
Table Layout
View

Spinner
ListView

UILabel
UITextView
UITextField
UIImageView
UITableView
UIView
UIPickerView
UITableView

Each of these will have their own properties (such as size and color), and each will have their own events. The point is that there is...

Summary


We have covered a lot in this chapter. If you've followed the chapter and looked at the code examples, then you should have an understanding now on how Xamarin Forms goes about both simple and more complex tasks and some of the ways you can use the native platform to provide facilities not available in the PCL.

In the next chapter, we shall be looking at how we can make the best use of the Portable Class Library, the power behind a Forms application.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Cross-platform UI Development with Xamarin.Forms
Published in: Aug 2015Publisher: ISBN-13: 9781784391195
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Paul Johnson

Paul Johnson has been writing software since the early 1980s on machines ranging from the ZX81 and servers to his trusty Mac, and has used more languages than he can remember. He is a qualified scuba diver and college lecturer. Paul lives with his wife, kids, and pets, and listens to an inordinate amount of rock and metal on Primordial Radio. This is his third book for Packt.
Read more about Paul Johnson