How could I play with margin and padding to add some spacing between image, texte and certainly my checkboxe ?
Thank you in advance for your support !
2 Answers, 1 is accepted
answered on 12 Mar 2021, 03:43 PM
You can use the VisualItemFormatting event to give more space between elements in SimpleListViewVisualItem. Please refer to the following code snippet:
this.radCheckedListBox1.VisualItemFormatting += this.RadCheckedListBox1_VisualItemFormatting;
privatevoidRadCheckedListBox1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
e.VisualItem.Image = Resources.bul;
//space between image and text
e.VisualItem.Layout.LeftPart.Margin = new Padding(0, 0, 15, 0);
//space between checkbox and image
((e.VisualItem as SimpleListViewVisualItem).Children as ListViewItemCheckbox).Padding = new Padding(0, 0, 15, 0);
I hope this helps. Should you have other questions do not hesitate to contact me.
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.