I'm using Visual Studio 2019 to develop Cross-Platform Mobile App (iOS & Android) via Xamarin C#.
I want to display my data in ListView via 2 columns. But, I've no idea how to do it. As far of my knowledge, I know the ListView is only display in 1 columns.
public MainPage()
{
InitializeComponent();
ObservableCollection<CardInfo> Name = new ObservableCollection<CardInfo>{
new CardInfo{BrandName = "Brand 1"},
new CardInfo{BrandName = "Brand 2"},
new CardInfo{BrandName = "Brand 3"},
new CardInfo{BrandName = "Brand 4"},
new CardInfo{BrandName = "Brand 5"},
new CardInfo{BrandName = "Brand 6"},
new CardInfo{BrandName = "Brand 7"},
new CardInfo{BrandName = "Brand 8"},
new CardInfo{BrandName = "Brand 9"},
new CardInfo{BrandName = "Brand 10"}
};
ListViewName.ItemsSource = Name;
<ListView x:Name="ListViewName" HasUnevenRows="True" HorizontalOptions="Start" VerticalOptions="Start" VerticalScrollBarVisibility="Never" >
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell >
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Style="{StaticResource FrameStyle}" Grid.Row="0" Grid.Column="0" >
<Label Text="{Binding BrandName}" Style="{StaticResource LabelStyle}" />
</Frame>
<Frame Style="{StaticResource FrameStyle}" Grid.Row="0" Grid.Column="1" >
<Label Text="{Binding BrandName}" Style= {StaticResource LabelStyle}" />
</Frame>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
Valuein the second Frame?Value?