New to Telerik UI for WPF? Download free 30-day trial

Button Extensions

The Telerik suite provides built-in extensions that can change different behaviors of the button controls. This article will go through these extensions.

  • HandleMouseWheelWhenOpen: A boolean property that gets or sets if the MouseWheel event is handled while a drop-down content of a drop-down button is open. By setting this property to true you won't be able to scroll your page while the drop-down content is open. The default value is false.

This property can be set on the following controls: RadDropDownButton, RadSplitButton, RadColorPicker, RadTimeSpanPicker, RadDateTimePicker, RadBreadCrumb.

Example 1: Set HandleMouseWheelWhenOpen attached property

<ScrollViewer Height="120"> 
    <StackPanel Height="800" Background="Bisque"> 
        <telerik:RadDropDownButton Content="Drop Down Button"  VerticalAlignment="Top" HorizontalAlignment="Left" telerik:DropDownExtensions.HandleMouseWheelWhenOpen="True"> 
            <telerik:RadDropDownButton.DropDownContent> 
                <telerik:RadListBox Height="50"> 
                    <telerik:RadListBoxItem Content="item 1"/> 
                    <telerik:RadListBoxItem Content="item 2"/> 
                    <telerik:RadListBoxItem Content="item 3"/> 
                    <telerik:RadListBoxItem Content="item 4"/> 
                    <telerik:RadListBoxItem Content="item 5"/> 
                    <telerik:RadListBoxItem Content="item 6"/> 
                    <telerik:RadListBoxItem Content="item 7"/> 
                    <telerik:RadListBoxItem Content="item 8"/> 
                </telerik:RadListBox> 
            </telerik:RadDropDownButton.DropDownContent> 
        </telerik:RadDropDownButton> 
    </StackPanel> 
</ScrollViewer> 

This property is not supported when the control (for example, RadDropDownButton) has its KeepOpen property set to True.

  • FocusContentOnOpen: A boolean property that gets or sets if the drop-down content of a drop-down button control should be focused when its drop-down content is open. The default value is false.

Example 2: Set FocusContentOnOpen attached property

<telerik:RadDropDownButton Content="Drop Down Button"  VerticalAlignment="Top" HorizontalAlignment="Left" telerik:DropDownButtonExtensions.FocusContentOnOpen="True"> 
    <telerik:RadDropDownButton.DropDownContent> 
        <telerik:RadListBox > 
            <telerik:RadListBoxItem Content="item 1"/> 
            <telerik:RadListBoxItem Content="item 2"/> 
            <telerik:RadListBoxItem Content="item 3"/> 
            <telerik:RadListBoxItem Content="item 4"/> 
        </telerik:RadListBox> 
    </telerik:RadDropDownButton.DropDownContent> 
</telerik:RadDropDownButton> 

See Also

In this article