RadDropDownList gets focused when the DpiScaleChanged is triggered.
Run the attached sample project. When the form is moved from monitor A (100% DPI) to monitor B (150% DPI), every RadDropDownList gets the focus which leads to scrolling the container back to the top.
Hello, Piotr,
Thank you for bringing this case to our attention. We will do our best to address it accordingly. Meanwhile, feel free to use the approach you have already found out for skipping the focus:
public sealed class XRadDropDownList : RadDropDownList
{
public XRadDropDownList()
{
DropDownStyle = RadDropDownStyle.DropDownList;
ListElement.AutoSizeItems = true;
}
protected override RadDropDownListElement CreateDropDownListElement()
{
return new XRadDropDownListElement();
}
public override string ThemeClassName => typeof(RadDropDownList).FullName;
private sealed class XRadDropDownListElement : RadDropDownListElement
{
public override void DpiScaleChanged(SizeF scaleFactor)
{
_skipFocusFlag = true;
base.DpiScaleChanged(scaleFactor);
_skipFocusFlag = false;
}
public override bool Focus()
{
if (_skipFocusFlag)
return false;
return base.Focus();
}
#region Properties
protected override Type ThemeEffectiveType => typeof(RadDropDownListElement);
#endregion
#region Fields
private bool _skipFocusFlag;
#endregion
}
}
If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.