Now, once we have created the ViewModel class, it is time to create the code for the graphical user interface (GUI). Go through the following steps to create the GUI for the MainView view:
- Create a new folder called Views in the HotDogOrNot project.
- Add a new XAML ContentPage called MainView.
- Set the Title property of the ContentPage to Hotdog or Not hotdog.
- Add a StackLayout to the page, and set its VerticalOptions property to Center.
- Add a Button to the StackLayout, with the text Take Photo. For the Command property, add a binding to the TakePhoto property in the ViewModel class.
- Add a Button to the StackLayout, with the text Pick Photo. For the Command property, add a binding to the Pick Photo property in the ViewModel class, as shown in the following code block:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft...