Please run the attached sample project, open the drop down and press the down arrow key.
Observed: application hangs
Expected: since all menu items in the drop down are disabled, nothing is expected to happen. However, the application shouldn't hangs.
Workaround:
public class CustomRadDropDownButtonElement : RadDropDownButtonElement
{
protected override Type ThemeEffectiveType
{
get
{
return typeof(RadDropDownButtonElement);
}
}
protected override RadDropDownButtonPopup CreateDropDown()
{
return new CustomDropDown(this);
}
}
public class CustomDropDown : RadDropDownButtonPopup
{
public CustomDropDown(RadElement ownerElement) : base(ownerElement)
{
}
protected override void EnsureItemEnabled(RadItem item, bool isUp)
{
do
{
item = this.GetNextItem(item, !isUp);
if (item == this.Items.Last())
{
break;
}
} while (!item.Enabled);
if (item != null)
{
this.SelectItem(item);
}
}
}