This is a migrated thread and some comments may be shown as answers.

RadListView IconsView Items Alignment.

1 Answer 202 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Eldad
Top achievements
Rank 1
Eldad asked on 06 Feb 2020, 02:24 PM

Hi,

I'm using the RadListView control With IconsView View, Is it possible to align the items to the center? 

I figured out i should play with the contols Padding property value to achieve this goal but i'm wondering if there's 

a setting that handles this case (And keeps everything aligned after resize for example)

I've attached 2 images to show the normal behavior and the wanted behavior.

Thanks in advance! :)

 

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 11 Feb 2020, 08:42 AM

Hello Eldad,

Currently, there is no such exposed public property that handles the icon's alignment. The possible solution is to use the Padding property of the IconListViewVisualItem as you have already found out. You can use DockStyle.Fill in order to allow resizing the control appropriately.

this.radListView1.Dock = DockStyle.Fill;
private void RadListView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
{
    IconListViewVisualItem item = e.VisualItem as IconListViewVisualItem;
    item.Padding = new Padding(15);
}

Please let me know if you have additional questions.

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ListView
Asked by
Eldad
Top achievements
Rank 1
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or