Completed
Last Updated: 14 Feb 2020 13:43 by ADMIN
Release R1 2020 SP
Martin Ivanov
Created on: 23 Jan 2020 13:03
Category: Buttons
Type: Bug Report
0
Buttons: The dropdown content of RadDropDownButton stays open when scrolling the control outside of the viewport
If you host RadDropDownButton in a ScrollViewer and then start scrolling (using mouse wheel) while its dropdown content is opened, the scrolling works and the buttons goes outside of the viewport. However, the dropdown content (Popup) stays within the viewport, which looks like the dropdown gets detached from the control.

To avoid this, handle the scrolling of the ScrollViewer when the dropdown content is opened. This behavior is already implemented in RadComboBox by overriding its OnMouseWheel method and handling the event arguments.

To work this around subscribe to the MouseWheel event of RadDropDownButton and set the Handled property of the event arguments to True.

private void RadDropDownButton_MouseWheel(object sender, MouseWheelEventArgs e)
{
	var btn = (RadDropDownButton)sender;
	if (btn.IsOpen)
	{
		e.Handled = true;
	}            
}


1 comment
ADMIN
Milena
Posted on: 14 Feb 2020 13:43

A new telerik:DropDownExtensions.HandleMouseWheelWhenOpen attached property is exposed for easier handling of the mouse wheel. It can be used on DropDownButton, SplitButton, ColorPicker, TimeSpanPicker, DateTimePicker, BreadCrumb.