Hi,
Is It possible to create a listview with a group header like a tabbed menu on de top of listview?
Thanks
|
<syncfusion:SfListView.GroupHeaderTemplate>
<DataTemplate>
<Grid BackgroundColor="#4CA1FE" HeightRequest="60">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="1" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" >
<Label x:Name="info" BackgroundColor="Transparent" Text="Informations" FontAttributes="Bold" FontSize="18" TextColor="White"
HorizontalTextAlignment="Center" VerticalTextAlignment="Center" />
</Grid>
<Grid Grid.Column="3" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" >
<Label x:Name="status" BackgroundColor="Transparent" Text="Status" FontAttributes="Bold" FontSize="18" TextColor="White"
HorizontalTextAlignment="Center" VerticalTextAlignment="Center" />
</Grid>
<BoxView Grid.Column="0" BackgroundColor="White" />
<BoxView Grid.Column="2" BackgroundColor="White" />
<BoxView Grid.Column="4" BackgroundColor="White" />
</Grid>
</DataTemplate>
</syncfusion:SfListView.GroupHeaderTemplate> |
Hi,
In this example https://help.syncfusion.com/xamarin/listview/headerandfooter#tabview-appearance-using-listview-header is possible to keep a single list and as you scroll through the list, change the header programmatically? In this example it is necessary tapped on the header and the list will filter only the selected one. I would like to always have the complete list and highlighted the header referring to the part of the list that is visible like the attached image.
Thanks.
Attachment: header_sample_zip_2244ae20.zip
Thank you very much!
It's perfect.
Hi,
In this example could demonstrate with remote data?
Thanks
Hi Lakshmi,
Thank you very much.
Is it possible in this example when tapped any item in top row list, make the bottom list scroll up according to the item selected in the top one?
In addition, would it be possible to also show around three items in the top list and only the one that is active show BoxView line by ItemTemplate conditional like image below?
Thanks
|
private void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
{
var tappedItem = ParentListView.DataSource.DisplayItems.FirstOrDefault(x => (x is GroupResult group) && (group.Key.ToString() == (e.ItemData as ItemsDetails).ItemName));
var index = ParentListView.DataSource.DisplayItems.IndexOf(tappedItem);
ParentListView.LayoutManager.ScrollToRowIndex(index, Syncfusion.ListView.XForms.ScrollToPosition.Start, true);
} |
|
<syncfusion:SfListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="3"/>
</Grid.RowDefinitions>
<Label Text="{Binding ItemName}" TextColor="LightGray" FontSize="Medium" FontAttributes="Bold" HorizontalOptions="Center" VerticalOptions="Center">
<Label.Triggers>
<DataTrigger TargetType="Label"
Binding="{Binding HighLight}"
Value="true">
<Setter Property="TextColor" Value="Red"/>
</DataTrigger>
</Label.Triggers>
</Label>
<BoxView Grid.Row="1" BackgroundColor="Red" >
<BoxView.Triggers>
<DataTrigger TargetType="BoxView"
Binding="{Binding HighLight}"
Value="false">
<Setter Property="IsVisible" Value="false"/>
</DataTrigger>
</BoxView.Triggers>
</BoxView>
</Grid>
</DataTemplate>
</syncfusion:SfListView.ItemTemplate> |