My MainPage.xaml
<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness"
iOS=" 0,0,0,0"
Android="0,0,0,0"
WinPhone="12,10,12,10"></OnPlatform>
</ContentPage.Padding>
<StackLayout>
<ListView x:Name="EmployeeViewList" SeparatorVisibility="Default">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" Padding="0,0,0,1">
<Label Text="{Binding Id}" />
<Label Text="{Binding Name}"/>
<Label Text="{Binding Name}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
my MainPage.xaml.cs
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace rargMobile
{
public partial class MainPage : ContentPage
{
public class Employee
{
public int Id { get; set; }
public string Name { get; set; }
}
List<Employee> employees = new List<Employee>();
public MainPage()
{
InitializeComponent();
employees.Add(new Employee { Id = 1, Name = "Rob Finnerty" });
employees.Add(new Employee { Id = 2, Name = "Bill Wrestler" });
employees.Add(new Employee { Id = 4, Name = "Dr. Geri-Beth Hooper" });
employees.Add(new Employee { Id = 5, Name = "Dr. Keith Joyce-Purdy" });
employees.Add(new Employee { Id = 6, Name = "Sheri Spruce" });
employees.Add(new Employee { Id = 7, Name = "Burt Indybrick" });
EmployeeViewList.ItemsSource = employees;
}
}
}
I want to show my list in this way this I did in windowsform with the same method, model and data.
This is what I was able to get to duplicate the last column so they can see that they are not separated by cells
Is there another method to separate by columns?