Increase the size of the current item in a listview

Hello supporter,

I have a listview which shows items horizontally. The size of the items is small and is adapted to the screen size so that all items are visible without the need for horizontal scrollbars. 
But the current or selected item needs more space because there are buttons on it to trigger actions for this item. 

How can I achieve, that the current item is set to the width I need to fully show all the buttons but all other items are kept smaller?

I hope you jave a solution for that.
Kind regards

Frank


1 Reply

SN Santhosh Natarajan Syncfusion Team January 16, 2026 09:59 AM UTC

Hi Frank

 

Thanks for outlining your scenario. Based on our current understanding, we’ve implemented different items sizes for the current items than the remaining items while ensuring all items stay within the view.

You can achieve this functionality by utilizing the SfListView’s QueryItemSize property, which allows dynamic item sizing at runtime. Within the QueryItemSize implementation, return a larger width for the currently selected item to accommodate the buttons and a smaller width for all other items. You can also use AutoFitMode to let the ListView adapt measurements, while QueryItemSize explicitly controls the selected item’s width.

Example code snippet

void ListView_QueryItemSize(object sender, QueryItemSizeEventArgs e)

{

    // Only for items (skip headers/footers/groups if any)

    if (e.ItemType != ItemType.Record)

        return;

 

    if (e.DataItem == sfListView.CurrentItem)

    {

 

    }

}

Item size customization:  https://help.syncfusion.com/maui/listview/item-size-customization

A sample with the above approach is attached for your reference. 

If this doesn’t align with your expected behavior, please let us know your desired interaction and any additional details of your requirements, and we’ll adjust the solution accordingly


Attachment: ListUIV_93e639e.zip

Loader.
Up arrow icon