I'm looking for a way to listen to changes to the values of the properties:
XamRibbon.IsMinimizedContextualTabGroup.Visible
There are no IsMinimizedChanged or VisibleChanged events, and binding doesn't seem to work.
Any ideas?
You can submit a suggestion for adding those events. Both of those properties are DependencyProperties so binding should work. If you still have a problem please post a sample demonstrating the problem.
Markup:
<r:XamRibbon IsMinimized="{Binding IsRibbonMinimized, Mode=TwoWay}" />
Code-behind:
private bool isRibbonMinimized; private bool IsRibbonMinimized { get { return isRibbonMinimized; } set { if (isRibbonMinimized != value) { isRibbonMinimized = value; SendPropertyChanged("IsRibbonMinimized"); } } }
Thanks.
Silly me. I did specify the DataContext (and even the binding mode!), but forgot to change the property to public... too much of a copy-paste I guess :)
It works like a charm. Thank you for your patience.
I don't think you can bind to a private property. So as long as your IsRibbonMinimized is public and the object that has that property is the DataContext (since you're not specifying a source/relativesource) then it should work.