Introduction
In one of my
previous articles, we discussed how to add an item in the ListView. Now, in this article, we will discuss how to remove an item from the ListView. So, let's dive into the article.
Prerequisites
Step 2
Now, a new window will open. Select Blank App -> Xamarin.Forms ->Portable Class Library (PCL) and then click OK.
Step 3
Select the Target version and minimum version for your project to run the UWP application on any device and then click OK.
Step 4
After creating the project, open the solution explorer and set the Portable Class as Startup Project.
Step 5
Now, in Portable Class, add 3 new folders - Models, ViewModels, and Views.
Step 6
Now, in Models folder, create a new class ContentPage called Products. Similarly, under ViewModels, create a new class called ProductsViewModel. Now, in Views folder, drag and drop the MainPage.xaml file.
Step 7
Now, in Products, write the following C# code for receiving and storing the name and price of the items.
C# Code