RadRibbonSplitButton: Disable Button, but enable DropDown?

2 posts, 1 answers
  1. Erik
    Erik avatar
    7 posts
    Member since:
    Sep 2013

    Posted 20 Oct 2014 Link to this post

    Hi,

    I want to disable the button part of the RadRibbonSplitButton, if the default action is not valid. But at the same time some of the actions in the drop down part are valid. But when I disable the RadRibbonSplitButton, the dropw down "button" is disabled too. So the user can't choose an action from the dropdown.
     
    Is it possible to disable the button, but enable the dropdown?

    Erik    
  2. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 23 Oct 2014 Link to this post

    Hi,

    In order to achieve your requirements you can use the RadSplitButton.ButtonPartStyle property. You can use a custom Style targeting the RadButton (the button part of the split button) and control its IsEnabled property.

    <telerik:RadSplitButton Content="Toggle Part">
        <telerik:RadSplitButton.ButtonPartStyle>
            <Style TargetType="telerik:RadButton">
                <Setter Property="IsEnabled" Value="{Binding ElementName=Disable, Path=IsChecked, Mode=TwoWay}"/>
            </Style>
        </telerik:RadSplitButton.ButtonPartStyle>
    </telerik:RadSplitButton>
    Please give this approach a try and let me know if you need any further assistance.

    Regards,
    Pavel R. Pavlov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top