Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143176 | Mar 7,2019 01:33 PM UTC | Mar 8,2019 07:17 AM UTC | Xamarin.Forms | 1 |
![]() |
Tags: SfListView |
<syncfusion:SfListView>
<syncfusion:SfListView.GroupHeaderTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout Orientation="Horizontal" BackgroundColor="#ddd">
<Label Text="{Binding Key}" TextColor="SteelBlue" FontSize="16" FontAttributes="Bold" VerticalOptions="Center" />
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</syncfusion:SfListView.GroupHeaderTemplate>
</syncfusion:SfListView>
|
public partial class MainPage : ContentPage
{
public MainPage()
{
listView.DataSource.GroupDescriptors.Add(new GroupDescriptor()
{
PropertyName = "ContactName",
KeySelector = (object obj1) =>
{
var item = (obj1 as Contacts);
return item.ContactName;
}
});
}
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.