Binding to CheckBox.IsChecked

Ribbon for WPF Forum

Posted 11 years ago by David Mullin
Version: 4.5.0484
Avatar
If I put this XAML into the Ribbon:
<CheckBox IsChecked="{Binding Path=DisableOverlayCaching}" Content="Disable Screen Overlay Caching" />
The binding works fine.

If I put this XAML in:
<ribbon:CheckBox IsChecked="{Binding Path=DisableOverlayCaching}" Label="Disable Screen Overlay Caching" />
It does not.

I do not see any binding errors in the output window. The DP that is being bound to is:
public static readonly DependencyProperty DisableOverlayCachingProperty = DependencyProperty.Register("DisableOverlayCaching", typeof(bool), typeof(DeveloperTab), new FrameworkPropertyMetadata(false, OnDisableOverlayCachingChanged));
Is there something else I should try?

David Mullin
IMA Technologies

Comments (4)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi David,

I tried this in a sample here and it worked fine. I did Mode=TwoWay binding because I bound both CheckBox controls to the prop on the Window, then toggled the window prop.


Actipro Software Support

Posted 11 years ago by David Mullin
Avatar
I added Mode=TwoWay and it all worked.

It would appear that the standard WPF CheckBox has a default Mode of TwoWay, while the Ribbon CheckBox does not.

Was this intentional?
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We added the default to TwoWay option for the next build.


Actipro Software Support

Posted 11 years ago by David Mullin
Avatar
I just so love working with a smaller company. Your support ROCKS!
The latest build of this product (v2019.1 build 0684) was released 19 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.