This question is locked. New answers and comments are not allowed.
Hi Guys
I have class that inherits RadListBox to implement a menu.
I am loading an image and want to display the text at the left hand side of the item (ListBox cell) and the image at the right hand end.
"i" is a RadListBoxItem:
i.DisplayStyle = DisplayStyle.ImageAndText;
i.ImageAlignment = ContentAlignment.MiddleRight;
i.TextImageRelation = TextImageRelation.TextBeforeImage;
i.TextAlignment = ContentAlignment.MiddleLeft;
i.Image = item.Icon;
Items.Add(i);
EndInit();
This gives me the image straight after the text. The ImageAlignment property appears to be ignored.
In fact the only property it seems to honor is TextImageRelation
If I pad the text with spaces I can move the graphic across the cell, but this is too imprecise for a generic solution.
I tried experimenting with the AutoSize and AutoSizeMode property to no avail.
What is the best way of achieving this?
Thanks in advance
I have class that inherits RadListBox to implement a menu.
I am loading an image and want to display the text at the left hand side of the item (ListBox cell) and the image at the right hand end.
"i" is a RadListBoxItem:
i.DisplayStyle = DisplayStyle.ImageAndText;
i.ImageAlignment = ContentAlignment.MiddleRight;
i.TextImageRelation = TextImageRelation.TextBeforeImage;
i.TextAlignment = ContentAlignment.MiddleLeft;
i.Image = item.Icon;
Items.Add(i);
EndInit();
This gives me the image straight after the text. The ImageAlignment property appears to be ignored.
In fact the only property it seems to honor is TextImageRelation
If I pad the text with spaces I can move the graphic across the cell, but this is too imprecise for a generic solution.
I tried experimenting with the AutoSize and AutoSizeMode property to no avail.
What is the best way of achieving this?
Thanks in advance