Creating the Swiper control is a straightforward process. We just need to make sure that we select the correct item template, which is the Content View, by doing the following:
- In the .NET Standard library project, create a folder called Controls.
- Right-click on the Controls folder, select Add, and then click New item... .
- Select Visual C# Items and then Xamarin.Forms in the left pane of the Add New Item dialog box.
- Select the Content View item. Make sure you don't select the Content View (C#) option; this only creates a C# file and not a XAML file.
- Name the control SwiperControl.xaml.
- Click Add.
Refer to the following screenshot to view the preceding information:
This adds a XAML file for the UI and a C# code-behind file. It should look like the following screenshot: