We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GroupHeader rendering

Thread ID:

Created:

Updated:

Platform:

Replies:

141152 Nov 27,2018 10:02 AM UTC Nov 28,2018 12:07 PM UTC Xamarin.Forms 1
loading
Tags: SfListView
Thomas Loidolt
Asked On November 27, 2018 10:02 AM UTC

Hey,

I ran in the Problem that everytime I'm using the SfListView-Header the first HeaderGroup is indented as seen in the screenshot. What I see is that the missing part of the first HeaderGroup is exactly the same size as the scrollbar.

this is my Code

_tripsListView.GroupHeaderTemplate = new DataTemplate(() =>
      {
        var grid = new Grid()
        {
          BackgroundColor = Color.FromHex(hexBackgroundColor)
        };
        grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
        grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
        var grouping = new StackLayout()
        {
          VerticalOptions = LayoutOptions.Center,
          HorizontalOptions = LayoutOptions.Start,
          Orientation = StackOrientation.Horizontal,
          Padding = new Thickness(0, 0, 0, 0)
        };
        var yearLabel = new Label
        {
          TextColor = Color.FromHex(hexFontColor),
          FontSize = fontSize + 6,
          FontAttributes = FontAttributes.Bold
        };
    var groupingImg = new Image() {
        Source = ImageSource.FromResource("BaseKit.Resources.arrow_down_white.png"),
    };
    groupingImg.SetBinding(Image.SourceProperty, "IsExpand", BindingMode.Default, new GroupingConverter(), null);
        yearLabel.SetBinding(Label.TextProperty, new Binding("Key"));
    grouping.Children.Add(groupingImg);
        grouping.Children.Add(yearLabel);

        var counting = new StackLayout()
        {
          VerticalOptions = LayoutOptions.Center,
          HorizontalOptions = LayoutOptions.EndAndExpand,
          Orientation = StackOrientation.Horizontal
        };
        var countLabel = new Label
        {
          TextColor = Color.FromHex(hexFontColor),
          FontSize = fontSize + 6
        };
        countLabel.SetBinding(Label.TextProperty, new Binding("Count", BindingMode.Default, null, null, "{0,3:###}"));
        var countlabel2 = new Label() { Text = "Trips:", TextColor = Color.FromHex(hexFontColor), FontSize = fontSize + 6 };
        counting.Children.Add(countlabel2);
        counting.Children.Add(countLabel);
        grid.Children.Add(grouping);
        grid.Children.Add(counting, 1, 0);
        return grid;
      });

Attachment: Screenshot_20181127101709_8f30b482.zip

Jayaleshwari N [Syncfusion]
Replied On November 28, 2018 12:07 PM UTC

Hi Thomas,  
  
Thanks for using Syncfusion products.  
  
We have checked the reported query “First group header not renderer properly” from our end. We have prepared the sample based on the template given by you. Unfortunately, the reported issue does not replicate at our end. Listview is loaded in the view as expected and group header rendered properly.  
  
For your reference we have attached the sample and you can download it from the below link.  
  
  
Can you please check the reported issue occurs in our sample also? If the sample does not meet you requirement then we request to modify the sample to replicate the issue or Please share the more details about the reported issue which would highly help us to analyze the query better and provide an appropriate solution.    
  
Regards,  
Jayaleshwari N 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon