Now, we will add the buttons and the entry that the user will use to write chat messages. The icons that we will be using can be found in the GitHub repository for this chapter. For Android, the icons will be placed in the Drawable folder inside the Resource folder and for iOS, they will be in the Resource folder. The icons are in the same folder on GitHub:
- Locate the <!-- TODO Add buttons and entry controls --> comment in the ChatView.xaml file.
- Add an Image. Source should be set to photo.png and VerticalOptions and HorizontalOptions should be set to Center. Source will be used to display an image, while HorizontalOptions and VerticalOptions will be used to center the image in the middle of the control.
- Add a TapGestureRecognizer object to the GestureRecognizers property of Image. Command will be executed when a user taps the image. Bind the Command property of Image to the Photo property...