I am experiencing the same behaviour as the original poster.
In our DropDownLists we have a number
of really long items which we want to automatically size so they are
more easily visible and readable. There aren't loads of them but we
often have many similar items where the only differentiating text is at
the end and it's impossible to tell which one is which without this
behaviour. We do this by setting AutoSizeItems = true;
In the 2016 Q1 release we implemented this perfectly according to our requirements. In the 2017 R2 release this is now broken.
This behaviour is broken without any themes applied and also if the VisualStudio2012Light theme is applied (see attached image). I haven't tested any other themes.
Disabling animations makes no difference.
I am working in .NET 4.5 and don't have .NET 4.7 installed and there is no custom manifest.
Since this basically renders the list useless afterwards we need to fix this ASAP. Are there any workarounds for this?
I see there is a 2017 R2 SP1 out but I am loathe to update to this
version unless it definitely fixes the issue. Every time we update,
existing behaviour is changed or broken.
static
class
Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static
void
Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(
false
);
Application.Run(
new
Form1());
}
}
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
}
}
partial
class
Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System.ComponentModel.IContainer components =
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose(
bool
disposing)
{
if
(disposing && (components !=
null
))
{
components.Dispose();
}
base
.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent()
{
Telerik.WinControls.UI.RadListDataItem radListDataItem1 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem2 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem3 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem4 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem5 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem6 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem7 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem8 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem9 =
new
Telerik.WinControls.UI.RadListDataItem();
Telerik.WinControls.UI.RadListDataItem radListDataItem10 =
new
Telerik.WinControls.UI.RadListDataItem();
this
.radDropDownList1 =
new
Telerik.WinControls.UI.RadDropDownList();
((System.ComponentModel.ISupportInitialize)(
this
.radDropDownList1)).BeginInit();
this
.SuspendLayout();
//
// radDropDownList1
//
this
.radDropDownList1.AutoSizeItems =
true
;
this
.radDropDownList1.DropDownAnimationEnabled =
false
;
radListDataItem1.Text =
"ListItem 1"
;
radListDataItem2.Text =
"ListItem 2"
;
radListDataItem3.Text =
"ListItem 3"
;
radListDataItem4.Text =
"ListItem 4"
;
radListDataItem5.Text =
"ListItem 5"
;
radListDataItem6.Text =
"ListItem 6"
;
radListDataItem7.Text =
"ListItem 7"
;
radListDataItem8.Text =
"ListItem 8"
;
radListDataItem9.Text =
"ListItem 9"
;
radListDataItem10.Text =
"ListItem 10"
;
this
.radDropDownList1.Items.Add(radListDataItem1);
this
.radDropDownList1.Items.Add(radListDataItem2);
this
.radDropDownList1.Items.Add(radListDataItem3);
this
.radDropDownList1.Items.Add(radListDataItem4);
this
.radDropDownList1.Items.Add(radListDataItem5);
this
.radDropDownList1.Items.Add(radListDataItem6);
this
.radDropDownList1.Items.Add(radListDataItem7);
this
.radDropDownList1.Items.Add(radListDataItem8);
this
.radDropDownList1.Items.Add(radListDataItem9);
this
.radDropDownList1.Items.Add(radListDataItem10);
this
.radDropDownList1.Location =
new
System.Drawing.Point(82, 112);
this
.radDropDownList1.Name =
"radDropDownList1"
;
this
.radDropDownList1.Size =
new
System.Drawing.Size(125, 20);
this
.radDropDownList1.TabIndex = 0;
//
// Form1
//
this
.AutoScaleDimensions =
new
System.Drawing.SizeF(6F, 13F);
this
.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this
.ClientSize =
new
System.Drawing.Size(284, 261);
this
.Controls.Add(
this
.radDropDownList1);
this
.Name =
"Form1"
;
this
.Text =
"Form1"
;
((System.ComponentModel.ISupportInitialize)(
this
.radDropDownList1)).EndInit();
this
.ResumeLayout(
false
);
this
.PerformLayout();
}
#endregion
private
Telerik.WinControls.UI.RadDropDownList radDropDownList1;
}