Button.IsChecked Property (Binding)

Ribbon for WPF Forum

Posted 14 years ago by Daniel
Version: 9.2.0514
Hello ActiPro

I want to simply bind to an Property in a Context. It will just runs great with a RibbonCheckBox or an ToggleButton (CustomControl). But it just happen nothing with a RibbonButton:

Neither of this worked:

<ribbon:Button ImageSourceLarge="{StaticResource ImageSpellCheck}" Label="SpellCheck" IsChecked="{Binding IsSpellcheckEnabledP.Value}"/>

<ribbon:RibbonButton ImageSourceLarge="{StaticResource ImageSpellCheck}" Label="SpellCheck">
                                    <ribbon:CheckableCommandParameter IsChecked="{Binding IsSpellcheckEnabledP.Value}" />
Thank you for your Support


Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA

Binding to the command parameter's IsChecked won't update anything until the command's CanExecute is run again. If you call CommandManager.InvalidateRequerySuggested() afterwards it may work.

However our ribbon button has an IsChecked property on it you can bind to as well. That will update the command parameter's IsChecked property if it is changed.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.