Syncfusion.SfListView.XForms
Members  Example 

SfListView Class

SfListView control renders a set of data items with different layouts and orientations. Data can be grouped, sorted, and filtered with ease.
Object Model
SfListView ClassAutoScroller ClassDataSource ClassDragDropController ClassItemGenerator ClassLayoutBase ClassSelectionController Class
Syntax
[Preserve()]
[DesignTimeVisible(true)]
public class SfListView : Xamarin.Forms.Grid, Syncfusion.Core.XForms.IPullToRefresh, Syncfusion.XForms.ParallaxView.IParallaxView, Xamarin.Forms.IAnimatable, Xamarin.Forms.IElementConfiguration<Grid>, Xamarin.Forms.IElementController, Xamarin.Forms.IGridController, Xamarin.Forms.ILayout, Xamarin.Forms.ILayoutController, Xamarin.Forms.IViewContainer<View>, Xamarin.Forms.IViewController, Xamarin.Forms.IVisualElementController  
Example
The following example demonstrates how to initialize and use the SfListView in Xamarin.Forms.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Syncfusion.ListView.XForms;
using Xamarin.Forms;
             
namespace BookInfo
{
             
  class BookInfo
  {
             
    public string BookName { get; set; }
    public string BookAuthor { get; set; }
             
    public BookInfo(string bookName, string bookAuthor)
    {
       BookName = bookName;
       BookAuthor = bookAuthor;
    }
             
}
             
  class BookInfoMainPage : ContentPage
  {
             
    public BookInfoMainPage()
    {
             
      // Define some data.
      List bookInfo = new List
      {
        new BookInfo("Xamarin.Forms", " by Derek Jensen "),
        new BookInfo("Object-Oriented Programming in C#", "by Sander Rossel"),
        new BookInfo("iOS Succinctly", "by Ryan Hodson"),
        new BookInfo("Android Programming", "by Ryan Hodson"),
      };
             
      // Initializes the SfListView
      SfListView listView = new SfListView
      {
        // Source of the data  
        ItemsSource = bookInfo,
             
        // Define the template for displaying each item
        ItemTemplate = new DataTemplate(() =>
        {
          // Create a view with bindings for displaying each property.
          Label bookNameLabel = new Label() { FontSize = 18};
          bookNameLabel.SetBinding(Label.TextProperty, "BookName");
            
          Label bookAuthorLabel = new Label() { FontSize = 12 };
          bookAuthorLabel.SetBinding(Label.TextProperty, "BookAuthor");
            
          // returns a ViewCell.
          return new ViewCell
          {
            View = new StackLayout
            {
               Children = 
               {
                 bookNameLabel,
                 bookAuthorLabel
               }
            }
          };    
        })
      };
             
      this.Content = listView;
    }
  }
}
Inheritance Hierarchy

System.Object
   Xamarin.Forms.BindableObject
      Xamarin.Forms.Element
         Xamarin.Forms.VisualElement
            Xamarin.Forms.View
               Xamarin.Forms.Layout
                  Xamarin.Forms.Layout<T>
                     Xamarin.Forms.Grid
                        Syncfusion.ListView.XForms.SfListView

AssemblyVersion

Syncfusion.SfListView.XForms: 17.2451.0.46

See Also