How do I limit the number of characters shown when the text is too long?
For the text "Very Long Text Very Very Long" to take the form "Very Long Text ..."
OR text "VeryLongTextVeryVeryLong" to take the form "VeryLongTextV..."
1 Answer, 1 is accepted
Dess | Tech Support Engineer, Principal
answered on 20 Jan 2021, 06:02 AM
Generally, you can limit the size of the context menu by setting the DropDown.MaximumSize property. It is necessary to restrict the menu item as well.
RadContextMenu menu = new RadContextMenu();
RadLabelElement lbl = new RadLabelElement();
lbl.Text = "Very Long Text Very Very Long";
lbl.TextWrap = false;
RadMenuItem item = new RadMenuItem();
item.MaxSize = lbl.MaxSize = new System.Drawing.Size(70,0);
menu.DropDown.MaximumSize = new Size(100, 0);
privatevoidradButton1_Click(object sender, EventArgs e)
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Dess | Tech Support Engineer, Sr.
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/.