Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to set different height for GroupHeaderTemplate and ItemTemplate?

$
0
0

I want to set variable height for my list both header as well as items in the list. I have set HasUnevenRows = true, but when I set a value for RowHeight that value sets the height for both GroupHeader as well as ItemTemplate, but I want them to be different. Can someone help me out?

My code looks something like this

ListView  newList = new ListView
 {
        HasUnevenRows = true,
        //RowHeight = 60,

        GroupHeaderTemplate = new DataTemplate( ( ) =>
        {
                // some UI code

            return new ViewCell 
            {
                    View = grid,
            };
        )},

        ItemTemplate = new DataTemplate( ( ) =>
        {
                // some UI code
                return new ViewCell
            {
                View = grid;
            };
         }),
        GroupDisplayBinding = new Binding("Title"),
        IsGroupingEnabled = true,
        ItemsSource = SetupMainProcessList(),
};

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>