How to Disable RadExpander Header Click

Environment

Product RadExpander for WPF

Description

How to disallow the clicking of the RadExpander's header.

Solution

To achieve this requirement you can set the IsHitTestVisible property of the header button to False. This will prevent the propagation of mouse events to the button. To set the property of the button, you can use the HeaderButtonStyle property of RadExpander.

Example 1: Disable header button click

    <telerik:RadExpander.HeaderButtonStyle> 
        <Style TargetType="telerik:RadToggleButton"> 
            <Setter Property="IsHitTestVisible" Value="False" /> 
        </Style> 
    </telerik:RadExpander.HeaderButtonStyle> 

See Also

In this article
Not finding the help you need? Improve this article